[Tutor] How to write string in a file, each one on new line???
Asrarahmed Kadri
ajkadri at googlemail.com
Fri Oct 13 12:44:36 CEST 2006
Folks,
I dont like to swamp your mailboxes with my trivial questions. But please
tell me why this isnt working??
str = str + '\n'
fd.write(str) # fd is teh file handle
the traceback is as under:
Traceback (most recent call last):
File "scrap.py", line 39, in ?
fd.write(str + '\n')
IOError: (0, 'Error')
--
To HIM you shall return.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20061013/7f9a87ae/attachment.html
More information about the Tutor
mailing list