Need help with file object

rusi rustompmody at gmail.com
Thu Dec 12 23:53:10 EST 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