Some Python posix-related questions
Iñigo Serna
inigoserna at terra.es
Tue Feb 25 16:59:04 EST 2003
Hi,
after considering the same question to my lfm application [1] I've
decided to parse df.
Take a look at 'get_fs_info' function in 'files.py' file.
Iñigo
[1] http://www.terra.es/personal7/inigoserna/lfm
El mar, 25 de 02 de 2003 a las 10:20, Tim Daneliuk escribió:
> 1) On Unix-like (posix) systems, is there some reasonably straighforward
> way to get the mount information back. What I really want is:
>
> - The device name
> - Total available space
> - Available free space
> - Mount point
>
> I would prefer to not have to parse the results of the 'df' command to
> do this, since I cannot guarantee portability of the output of this
> command on all systems.
>
> 2) What does Mac OS X return for os.name? I have a program that is
> coded to work properly when os.name returns 'nt' or 'posix'. I
> was kinda hoping that OS X returns 'posix' (and my program should
> thus work there), as I have no access to such as system.
>
> TIA,
> ------------------------------------------------------------------------------
> Tim Daneliuk
tundra at tundraware.com
--
Iñigo Serna <inigoserna at terra.es>
Katxijasotzaileak
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20030225/5406e9c7/attachment.sig>
More information about the Python-list
mailing list