file size 'mystery'
Sami Hangaslammi
shangius at yahoo.com
Wed May 21 11:19:45 EDT 2003
More information about the Python-list mailing list
Wed May 21 11:19:45 EDT 2003
- Previous message (by thread): file size 'mystery'
- Next message (by thread): Tkinter / Idle weirdness
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> You are right for this case. But I left out an important part: the > "file" is an file-object of Zope (it does not exist in the FS). So I can > not use the os module of python. For file objects and file-like objects that support seek, you can find out the size of the file by doing f.seek(0,2) and f.tell(). Should be more efficient than f.read() in most cases.
- Previous message (by thread): file size 'mystery'
- Next message (by thread): Tkinter / Idle weirdness
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list