Re: File object question
- From: Kent Johnson <kent@xxxxxxxxxxxxxxxx>
- Date: Thu, 22 Dec 2005 19:19:03 -0500
S. D. Rose wrote:
Hello all. If I read a binary file:
file = open('c:\\logo.gif', 'rw'') # Read from FS as one way to get the object, d/l from website another... file.read()
is there anyway I can determine the 'size' of the object file? (Without going to the filesystem and reading the filesize from the directory ...)
Once you have read the data you can get the size of that: d = file.read() print len(d)
Is that what you mean? Otherwise I don't know how you can get the size of a file without asking the filesystem...
Kent .
- Follow-Ups:
- Re: File object question
- From: S. D. Rose
- Re: File object question
- References:
- File object question
- From: S. D. Rose
- File object question
- Prev by Date: Re: Guido at Google
- Next by Date: Re: GUI and graph
- Previous by thread: Re: File object question
- Next by thread: Re: File object question
- Index(es):
Relevant Pages
|