Interpreting os.lstat()

Sion Arrowsmith siona at
Thu Jul 19 17:22:11 CEST 2007

Adrian Petrescu  <apetresc at> wrote:
>>>> print os.stat.__doc__
>stat(path) -> stat result
>Perform a stat system call on the given path.
>I checked the online Python documentation at

Someone else has already pointed out that this is hopelessly out of
date. Even if you are constrained to using 1.5.2, the current
documentation at least tells you what the elements of the tuple are.

>but it just says to "consult the documentation for your system.". At
>this point I'm guessing that os.lstat is nothing more than a wrapper
>for some Linux system call, so I looked up the results of running
>'stat' on the same file, [ ... ]

(a) Running 'stat' is *not the same* as a system call.

(b) "Consult[ing] the documentation" may be more productive than
running random(ish) programs. You should find

$ man 2 stat


\S -- siona at --
   "Frankly I have no feelings towards penguins one way or the other"
        -- Arthur C. Clarke
   her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump

More information about the Python-list mailing list