[Pythonmac-SIG] os.path.getsize()
Peter Sommerfeld
peter.sommerfeld@gmx.de
Tue, 29 Feb 2000 23:37:42 +0100
Nils Kassube wrote:
> Guten Abend.
Good evening :-)
> I hope, I don't miss something obvious again :-)
The obvious seems to be that os.stat is not defined on Mac.
(You know, think differently :-). os.stat is part of the posix
standart. Use Mac-Toolbox functions instead.
Gruesse aus Lueneburg
Peter
BTW: Use the IDE in debug mode and you'll find out things like
this easily. Type it in a new window, check "run as main" and
"enable debugger", set a breakpoint and hit cmd-R.
> --cut--
>>>> import os.path
>>>> os.path.getsize("a.py")
> Traceback (innermost last):
> File "<stdin>", line 1, in ?
> File "Macintosh HD:Programme:Python 1.5.2c1:Lib:macpath.py", line 107, in
> getsize
> return st[stat.ST_SIZE]
> NameError: stat
> --cut--
>
> What's wrong? It worked on Win32.
>
> Cheers,
> Nils
> --
> nika@kassube.de (preferred)
> 4kassube@informatik.uni-hamburg.de
>
>
>
> _______________________________________________
> Pythonmac-SIG maillist - Pythonmac-SIG@python.org
> http://www.python.org/mailman/listinfo/pythonmac-sig
>