Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #61790

Re: Need help with file object

Newsgroups comp.lang.python
Date 2013-12-12 20:53 -0800
References <mailman.4047.1386908972.18130.python-list@python.org>
Message-ID <7f8a1809-fd66-4bd9-a005-305d483ecd63@googlegroups.com> (permalink)
Subject Re: Need help with file object
From rusi <rustompmody@gmail.com>

Show all headers | View raw


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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Need help with file object Unix SA <d.joshi84@gmail.com> - 2013-12-13 09:59 +0530
  Re: Need help with file object rusi <rustompmody@gmail.com> - 2013-12-12 20:53 -0800
  Re: Need help with file object John Gordon <gordon@panix.com> - 2013-12-13 05:37 +0000

csiph-web