[Distutils] [Python-Dev] platform management

"Martin v. Löwis" martin at v.loewis.de
Thu Mar 20 17:42:26 CET 2008


> Looking at http://docs.python.org/lib/module-os.html, I find the following:
> 
>   name
>   
>     The name of the operating system dependent module imported. The
>     following names have currently been registered: 'posix', 'nt', 'mac',
>     'os2', 'ce', 'java', 'riscos'.
> 
> This implies that there's a registry somewhere?

This is actually the list of names that the "os" module may take.
There are different implementations of the os module, so instead of
"import os", you could write "import posix", "import nt", "import ce"
(assuming you run on one of these systems).

So it really has not much to do with the name of the operating system,
but rather with the name Python gives to the API.

Regards,
Martin


More information about the Distutils-SIG mailing list