Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~7K People Reached
Favorite Forums
Favorite Tags
Member Avatar for laspal

Hi, I am trying to create xl file using pyExcelerator in django. response = HttpResponse( mimetype='application/vnd.ms-excel') response['Content-Disposition'] = 'attachment; filename=output.xls' workbook = Workbook() worksheet = workbook.add_sheet('My Test Sheet') worksheet.write(0,0, 'Company', font_style('left', 1, 'red')) worksheet.write(1,1, 'Hello World!', font_style('left', 1, 'black')) workbook.save() return response The problem here is I am not able …

Member Avatar for laspal
0
102
Member Avatar for laspal

hi, I am using reportlab to generate pdf but having a problem in making list in tabular format. final list should be in this format: list =[ ['companies', 'industries'], ['1', '11'], ['2','22], ['3', '33'] ] data =[] data.append('companies') for item in some_list: data.insert(0, item) -> Assuming item gives me values …

Member Avatar for woooee
0
104
Member Avatar for laspal

Hi, I am having the problem in nested list. Here is the code : [code=python]data1= [['Contacts',company.contacts.count() ], ['Notes', company.notes.count()], ['Met by', ], ['Industry', industry], ['Financial Investors', '31']] for item in metlist: data1[2].insert(1,item) [/code] Basically I am trying to insert the value for Met by in [ 'Met by', metlist->value] I …

Member Avatar for vegaseat
0
190
Member Avatar for laspal

Hey, I am trying to create tuple but not able to do it. here is my code: datatuple =() for emailadd in mailing_list: datatuple((subject, message, sender, [emailadd])) send_mass_mail(datatuple) basically it should be in this format: datatuple = ( ('Subject', 'Message.', 'from@example.com', ['john@example.com']), ('Subject', 'Message.', 'from@example.com', ['jane@example.com']), ) so here my …

Member Avatar for woooee
0
137
Member Avatar for laspal

Hi I wanted to know how can I make sure that table exist in my database. [code] class Record: def __init__(self): self.conn = MySQLdb.connect( host = 'localhost', user = 'root', passwd = 'abcd', db = 'justfun') self.cursor = self.conn.cursor() self.cursor.execute("DROP TABLE IF EXISTS book") self.cursor.execute( """CREATE TABLE book (name char(40), …

Member Avatar for katharnakh
0
3K
Member Avatar for laspal

Hi I wanted to know how can I delete class object inside list. class Record: def __init__(self): self.list = [] def add(self): fname = raw_input("First Name:> ") lname = raw_input("Last Name:> ") street = raw_input("Street:> ") self.list.append( Person( fname, lname, street)) Now I have added my Person object into the …

Member Avatar for katharnakh
0
4K
Member Avatar for laspal

Hi I am new to python. So i am having problem while coding. Here the code import sys class Person: def __init__(self): self.list = [] def AddContact(self): fname = raw_input("First Name:> ") lname = raw_input("Last Name:> ") street = raw_input("Street:> ") self.list = [ fname, lname, street] def ListAll(self): print …

Member Avatar for sneekula
0
99