Message8063

Author jamesls
Recipients jamesls
Date 2013-07-14.19:32:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1373830335.62.0.240785905139.issue2068@psf.upfronthosting.co.za>
In-reply-to
Content
Mac OS X 10.8.3, using jython 2.7b1 I get:

import os

fd = os.open('testfile', os.O_RDWR|os.O_CREAT|os.O_APPEND)
os.write(fd, bytes('one'))
os.write(fd, bytes('two'))
os.write(fd, bytes('three'))
os.close(fd)

with open('testfile', 'rb') as f:
    print(f.read())

# Output, first time run:
$ jython /tmp/repro.py
three
# Second time
$ jython /tmp/repro.py
threethree

On CPython 2.7.5 I get:
$ python /tmp/repro.py
onetwothree
$ python /tmp/repro.py
onetwothreeonetwothree
History
Date User Action Args
2013-07-14 19:32:15jameslssetrecipients: + jamesls
2013-07-14 19:32:15jameslssetmessageid: <1373830335.62.0.240785905139.issue2068@psf.upfronthosting.co.za>
2013-07-14 19:32:15jameslslinkissue2068 messages
2013-07-14 19:32:14jameslscreate