> Absolutely, which is why I consider it foolish for the OP to be
> trying to deduce the meaning of os.stat by looking at the output
> of the stat program, rather than studying the man page for the
> stat system call.
Ah, ok. I missed that the OP had brought stat(1) into the
discussion. Now it's a
=?ISO-8859-15?Q?=22Martin_v=2E_L=F6wis=22?= <[EMAIL PROTECTED]> wrote:
>> But it obviously does a lot of other stuff, including formatting
>> the results of the system call for display.
>It most decisively does *not* format the results of the system call
>"for display".
"It" here refers to the p
> But it obviously does a lot of other stuff, including formatting
> the results of the system call for display.
It most decisively does *not* format the results of the system call
"for display". Instead, it converts the C data type holding the
stat result into a Python data type. That data type
=?ISO-8859-15?Q?=22Martin_v=2E_L=F6wis=22?= <[EMAIL PROTECTED]> wrote:
>> (a) Running 'stat' is *not the same* as a system call.
>Why do you say that? It is *exactly* the same [ ... ]
Maybe if stat were implemented as
int main(int argc, char** argv) {
struct stat so_what_am_I_supposed_to_do_
> (a) Running 'stat' is *not the same* as a system call.
Why do you say that? It is *exactly* the same, at least
on a POSIX system (on Windows, there is no stat, so the
implementation has to map that to several system calls).
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 19, 4:27 am, Hrvoje Niksic <[EMAIL PROTECTED]> wrote:
> Adrian Petrescu <[EMAIL PROTECTED]> writes:
> > I checked the online Python documentation
> > athttp://python.org/doc/1.5.2/lib/module-stat.html
> > but it just says to "consult the documentation for your system.".
>
> The page you're
Adrian Petrescu <[EMAIL PROTECTED]> 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
>http://python.org/doc/1.5.2/lib/module-stat.html
Someone else has already pointed out that this is ho
Adrian Petrescu <[EMAIL PROTECTED]> writes:
> I checked the online Python documentation at
> http://python.org/doc/1.5.2/lib/module-stat.html
> but it just says to "consult the documentation for your system.".
The page you're looking for is at
http://www.python.org/doc/current/lib/os-file-dir.ht
On Wed, Jul 18, 2007 at 05:55:59PM -0700, Adrian Petrescu wrote:
> I can see some correspondence between the "stat" call and os.lstat
> (for example, I'm guessing os.lstat(path)[6] represents the filesize),
> but I can't see the correspondence between some of the other fields.
> What does os.lstat(