[issue3207] file.write() after file.readline() in mode "r+"

2008-06-26 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Yes, the exact behaviour depends on multiple aspects. You should follow the C library conventions: http://www.cplusplus.com/reference/clibrary/cstdio/fopen.html """ For the modes where both read and writing (or appending) are allowed (

[issue3207] file.write() after file.readline() in mode "r+"

2008-06-26 Thread Peter
Peter <[EMAIL PROTECTED]> added the comment: Amaury Forgeot d'Arc, your example really raise IOError 0 Thing is that you had 1 string in the file Here is it: >>> open("delete.me", "w").write("first\nsecond\nthird") >>> fp = open("delete.me", "r+t") >>> fp.readline() 'first\n' >>> fp.write("Newbie

[issue3207] file.write() after file.readline() in mode "r+"

2008-06-26 Thread Peter
Changes by Peter <[EMAIL PROTECTED]>: ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue3207] file.write() after file.readline() in mode "r+"

2008-06-26 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: I tried this on windows 2000: >>> # create a file with some text >>> open("delete.me","w").write("some text\n") >>> >>> fp = open("delete.me", "r+t") >>> fp.readline() 'some text\n' >>> fp.write("New line \n") Traceback (most recent cal

[issue3207] file.write() after file.readline() in mode "r+"

2008-06-26 Thread Peter
Peter <[EMAIL PROTECTED]> added the comment: Sorry. I use Windows XP SP2 with all updates on 26.06.2008 Python 2.5.2 ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue3207] file.write() after file.readline() in mode "r+"

2008-06-26 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: Can't reproduce on Linux on 2.6 or 3.0. -- assignee: georg.brandl -> ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue3207] file.write() after file.readline() in mode "r+"

2008-06-26 Thread Peter
New submission from Peter <[EMAIL PROTECTED]>: Following code: fp = open("delete.me", "r+t") fp.readline() fp.write("New line \n") fp.close() Won't do anything. I mean nor writing to file, nor raising exception. Nothing. I can't find any note about this crap. So, it is the best plac