3 ms·
The file protocol is for generic streams, but you could seek to the end and then call tell(). If you just want to know the size of a file and don't want to wri
by krakensden 15y ago
The file protocol is for generic streams, but you could seek to the end and then call tell().
If you just want to know the size of a file and don't want to write to it, os.stat() will do what you want.