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

2017-01-26 Thread STINNER Victor
STINNER Victor added the comment: On Python 2, it's easy to workaround the issue, just always go the end explicitly: f = open(filename, "a+") f.seek(0, os.SEEK_END) Or use the io module which doesn't use the stdio of the C library and has a portable and reliable behaviour: f =

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

2017-01-25 Thread STINNER Victor
Changes by STINNER Victor : -- Removed message: http://bugs.python.org/msg286294 ___ Python tracker ___

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

2017-01-25 Thread Caitlin
Caitlin added the comment: Yeah, the workaround seemed to work for me when trying to open file on http://buywebsitetrafficreviews.org/, but this should be fixed somehow anyway. -- nosy: +caitlinwalker37 ___ Python tracker

[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(rC:\myfile.txt, a+) as f: ... f.tell() ... 0L But in Python 3.4.1.0 it gives a different result: with open(rC:\myfile.txt, a+) as f: ... f.tell() ...

[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 rep...@bugs.python.org http://bugs.python.org/issue22651 ___

[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 rep...@bugs.python.org

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

2014-10-16 Thread eryksun
Changes by eryksun eryk...@gmail.com: -- title: Python 2: Open file in a+ mode doesn't go to the end - Open file in a+ mode reads from end of file in Python 3.4 versions: +Python 3.4, Python 3.5 -Python 2.7 ___ Python tracker rep...@bugs.python.org