On Thursday 08 March 2007 14:40, kavitha thankaian wrote: > Hi Simon, > > iam till here: > > dorc=some['DorC'] > amount=some['amount'] > f=open("logfile.txt", "w") > if dorc =='C': > a = -(amount) > if dorc == 'D': > b = amount > sum=a + b > if sum == 0: > f.writelines("name:") > f.writelines("%s" %some['name']) > f.writelines("credit:") > f.writelines("%s" % amount) > > but i see an empty file opened,,, > > kavitha > > Simon Brunning <[EMAIL PROTECTED]> > wrote: > > On 3/8/07, kavitha thankaian wrote: > > can anyone help me??? > > I'm sure we can. How far have you got so far?
try f=open("logfile.txt", "w") f.write('name') f.write('\n') f.write(('credit(') f:close() jim-on-linux http:\\www.inqvista.com -- http://mail.python.org/mailman/listinfo/python-list