if you want POSIX, import posix, not os

Fredrik Lundh fredrik at pythonware.com
Tue Aug 17 05:18:46 EDT 1999

(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?)


More information about the Python-list mailing list