if you want POSIX, import posix, not os

Michael P. Reilly arcege at shore.net
Tue Aug 17 10:50:37 EDT 1999

Fredrik Lundh <fredrik at pythonware.com> wrote:
: (posted and mailed, as usual.  or to be precise, mailed and mailed ;-)

: Dan Connolly <connolly at w3.org> wrote:
:> >  > I hope the os module will be deprecated in future releases.
:> > 
:> > I don't think there is much chance of this happening, it it too widely
:> > used.
:> How about attempting to change that trend? i.e. how about
:> in stead of documenting os.getpgrp() with an availability
:> caveat, the os module documentation only lists the stuff
:> that's really expected to be portable, and has a note
:> at the bottom ala:
:> the os module may contain other implementation-defined
:> objects; for example, on posix platforms, the contents
:> of the posix module are shadowed in the os module.
:> [... list the other cases ...]

: sounds reasonable.

: (in other words, it's mostly a documentation
: problem, rather than a design problem...)

: (Fred?  Guido?)

The better question is:
   Why did it change from documenting these components in the OS-
   dependant sections (specifically only posix) to documenting them
   mostly in the module-os section in the current release?

Except for "New in version 1.5.2." comments, the pre-1.5.2
documentation listed nothing more than exec[lv]* functions and there
was only the "posix" module documented.


More information about the Python-list mailing list