Some Python posix-related questions

Tim Daneliuk tundra at tundraware.com
Tue Feb 25 10:20:11 CET 2003


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





More information about the Python-list mailing list