file object, details of modes and some issues.
simon place
simon_place at whsmithnet.co.uk
Thu Sep 4 18:35:11 EDT 2003
More information about the Python-list mailing list
Thu Sep 4 18:35:11 EDT 2003
- Previous message (by thread): ezmlm response
- Next message (by thread): file object, details of modes and some issues.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
could someone confirm ( or otherwise ) this bug.
manual says file.truncate leave the pointer unmoved, well it doesn't, and left
me with a bug in a program that took a bit of finding.
>>> f=file('test.dat','rb+')
>>> f.write('1234567890')
>>> f.close()
>>> f=file('test.dat','rb+')
>>> f.read(5)
'12345'
>>> f.tell()
5L
>>> f.truncate()
>>> f.tell()
10L
>>>
( PythonWin 2.3 (#46, Jul 29 2003, 18:54:32) [MSC v.1200 32 bit (Intel)] on
win32. )
- Previous message (by thread): ezmlm response
- Next message (by thread): file object, details of modes and some issues.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list