I got an err \"IOError: [Errno 0] Error\" with this python program:
from sys import argv
file = open(\"test.txt\", \"a+\")
print file.tell() # not at the EOF
The solution is to use open from io
D:\>python
Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> f = open('file.txt','a+')
>>> f.tell()
0L
>>> f.close()
>>> from io import open
>>> f = open('file.txt','a+')
>>> f.tell()
22L