Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: get_file_size

Reply
Thread Tools

Re: get_file_size

 
 
Egor Bolonev
Guest
Posts: n/a
 
      06-29-2003
> > f=open('1','wb')
> > print len(f)

>
> You don't need to open the file to get its size. The file's size is
> stored in the directory metadata about the file, along with its
> modification time, file name, permissions, etc.


How about that?
f=open('1','wb')
f.write(something)
print len(f)
Should I close file for get it size or should I write a C-like function with
seek(end),tell, seek(old)?


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments