Need help with file object

rusi rustompmody at gmail.com
Fri Dec 13 05:53:10 CET 2013


On Friday, December 13, 2013 9:59:25 AM UTC+5:30, Unix SA wrote:
> s=open('/tmp/file2')

<snipped>

>    s.write(line)

Among other things you are missing a write mode 

(2nd optional argument to open)

http://docs.python.org/2/tutorial/inputoutput.html#reading-and-writing-files



More information about the Python-list mailing list