[issue22651] Python 2: Open file in a+ mode on Windows doesn't go to the end

2014-10-16 Thread Nick Jacobson
Nick Jacobson added the comment: For writing, end of file seems correct. But for reading, the documentation says it should be the beginning of the file. "The initial file position for reading is at the beginning of the file, but output is always appended to the end of the file.&q

[issue22651] Open file in a+ mode reads from end of file in Python 3.4

2014-10-16 Thread Nick Jacobson
Nick Jacobson added the comment: I also should have mentioned that C:\myfile.txt in my example is 98 bytes long, so it is being read from the end instead of the beginning. -- ___ Python tracker <http://bugs.python.org/issue22

[issue22651] Open file in a+ mode reads from end of file in Python 3.4

2014-10-16 Thread Nick Jacobson
Nick Jacobson added the comment: Note: I'm running this in Windows 7, same result on Windows Server 2008. -- ___ Python tracker <http://bugs.python.org/is

[issue22651] Open file in a+ mode reads from end of file in Python 3.4

2014-10-16 Thread Nick Jacobson
New submission from Nick Jacobson: In Python 2.7.8.10 running the following gives one result: >>> with open(r"C:\myfile.txt", "a+") as f: ... f.tell() ... 0L But in Python 3.4.1.0 it gives a different result: >>>