Bug on Python2.3.4 [FreeBSD]?

curtis.rendon at gmail.com curtis.rendon at gmail.com
Sat Aug 13 17:04:08 EDT 2005


Using FreeBSD 4.10 and Python 2.3.4:


> uname -a
FreeBSD garner_ted 4.10-RELEASE FreeBSD 4.10-RELEASE #7: Thu Apr 28
22:44:58 CDT 2005

>python
Python 2.3.4 (#4, Nov 19 2004, 15:37:16)
[GCC 2.95.4 20020320 [FreeBSD]] on freebsd4
Type "help", "copyright", "credits" or "license" for more information.

using f.read('test','r+')
I get the existing data, and the
f.write('testing')
successfully appends the text in the file.

The 'a+'  mode works as described, i.e. I need to f.seek(0) to read the
data.

I am now enlightened as to the usefulness of 'r+', as it starts the
read fp at the begining of the file.

Curtis W. Rendon




More information about the Python-list mailing list