writing dictionary to file

kavitha thankaian kavithapython at yahoo.co.in
Thu Mar 8 14:40:57 EST 2007


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 <simon at brunningonline.net> wrote:
  On 3/8/07, kavitha thankaian wrote:
> can anyone help me???

I'm sure we can. How far have you got so far?

-- 
Cheers,
Simon B
simon at brunningonline.net
http://www.brunningonline.net/simon/blog/
GTalk: simon.brunning
MSN: small_values


 				
---------------------------------
 Here’s a new way to find what you're looking for - Yahoo! Answers 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070308/cd132228/attachment.html>


More information about the Python-list mailing list