Dreaded Newbie Question

Roberts, Robert J robert_j_roberts at rl.gov
Fri Jul 23 17:55:14 EDT 1999


Oh wow. I can actually answer one ;-)

I use:      fiSize = os.stat(pathin)[6]   #...where pathin is full path to
file.

...and:

stat (path) = Perform a stat system call on the given path. The return
value is a tuple of at least 10 integers giving the most important (and
portable) members of the stat structure, in the order st_mode, st_ino,
st_dev, st_nlink, st_uid, st_gid, st_size, st_atime, st_mtime, st_ctime.
More items may be added at  the end by some implementations. (On MS-DOS,
some items are filled with dummy values.)

...as found on /python/doc/lib/node105.html



Dani Epstein wrote:

> Hi!
>
> A newbie to Python (though currently coding in Delphi), I'm having a
> little difficulty tracking down stuff, although I have the tutorial and
> manuals. Where is the best place to get more info, and why is there no
> newsgroup for newbies like myself?
>
> For the moment though my grateful thanks goes to anyone who can tell me
> how to get a file's size, and where that info is to be found in the
> references.
>
> BTW, I'm running PythonWin 1.5.1
> --
>
> Dani Epstein





More information about the Python-list mailing list