Finding out the OS distribution name (platform.py)
M.-A. Lemburg
mal at lemburg.com
Fri Oct 22 11:41:31 EDT 1999
Randall Hopper wrote:
>
> M.-A. Lemburg:
> |I just uploaded a new version that now uses a function based API.
> |This avoids the long import time due the module scanning binaries
> |or spawning shells. The location is the same as above and running
> |the script still prints the above text to stdout except that
> |the libc check is now only done on Linux systems ...
>
> |... do *BSD and others have the problem of two different libc's ?
>
> No, not that can be linked with by the same set of objects (for FreeBSD).
>
> FreeBSD 3.x and later is ELF. Folks sometimes install AOUT libs for old
> progs they can't or don't want to rebuild, but that's not a problem. Build
> ELF, it links with ELF; build AOUT, it links with AOUT.
Thanks. So leaving the check out for FreeBSD is ok. What about other
nifty OSes like BeOS, NetBSD, the new BSD-based MacOS (can't remember the
name right now) ?
Some information about MSDOS, Amiga and Windows CE would also be nice,
BTW.
If all goes well, the module might be a good candidate for the
standard distribution. It offers *much* more detailed information
than sys.platform.
I've uploaded a new version:
http://starship.skyport.net/~lemburg/platform.py
To see if it works on your platform, simply run the script.
Enjoy,
--
Marc-Andre Lemburg
______________________________________________________________________
Y2000: 70 days left
Business: http://www.lemburg.com/
Python Pages: http://www.lemburg.com/python/
More information about the Python-list
mailing list