if you want POSIX, import posix, not os

Fredrik Lundh fredrik at pythonware.com
Tue Aug 17 17:12:28 CEST 1999


Michael P. Reilly <arcege at shore.net> wrote:
> 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.

consider the original:

    it's called "unlink", and it's implemented by the "nt" module on
    your computer. look under "posix" for a description, and don't
    forget to access it via the "os" module to make sure your code
    is portable. (1.2)

which later become:

    while that function is actually implemented by the "nt" module
    on your computer, it's documented under "posix".  by the way,
    access it via the "os" module to make sure your code is portable.
    (1.5)

with:

    you'll find that function under "os" (1.5.2)

or Dan's preferred:

    you'll find that function under "os", unless it's a posix-
    specific function. (1.5.2+?)

</F>





More information about the Python-list mailing list