Message229511
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:
>>> with open(r"C:\myfile.txt", "a+") as f:
... f.tell()
...
98
According to the man page for fopen, for a+ mode: "The initial file position for reading is at the beginning of the file." Source: http://linux.die.net/man/3/fopen |
|
Date |
User |
Action |
Args |
2014-10-16 07:57:12 | nicksjacobson | set | recipients:
+ nicksjacobson |
2014-10-16 07:57:11 | nicksjacobson | set | messageid: <1413446231.99.0.734842825619.issue22651@psf.upfronthosting.co.za> |
2014-10-16 07:57:11 | nicksjacobson | link | issue22651 messages |
2014-10-16 07:57:11 | nicksjacobson | create | |
|