[Python-Dev] Portable and OS-dependent module idea/proposal/brain fart

Andrew M. Kuchling akuchlin@mems-exchange.org
Wed, 18 Aug 1999 11:39:30 -0400 (EDT)


Skip Montanaro writes:
>    2. You would make it clear on all platforms when you expect to be
>       programming in a non-portable fashion, by importing the
>       platform-specific os (unix, nt, mac).  "import unix" would mean I

To my mind, POSIX == Unix; other platforms may have bits of POSIX-ish
functionality, but most POSIX functions will only be found on Unix
systems.  One of my projects for 1.6 is to go through the O'Reilly
POSIX book and add all the missing calls to the posix modules.
Practically none of those functions would exist on Windows or Mac.

Perhaps it's really a documentation fix: the os module should document
only those features common to all of the big 3 platforms (Unix,
Windows, Mac), and have pointers to a section for each of the
platform-specific modules, listing the platform-specific functions.

-- 
A.M. Kuchling			http://starship.python.net/crew/amk/
Setting loose on the battlefield weapons that are able to learn may be one of
the biggest mistakes mankind has ever made. It could also be one of the last.
    -- Richard Forsyth, "Machine Learning for Expert Systems"