sys.platform documentation?

Michiel Sikma michiel at thingmajig.org
Thu Aug 10 05:46:03 EDT 2006


Op 10-aug-2006, om 10:44 heeft Sybren Stuvel het volgende geschreven:

> Michiel Sikma enlightened us with:
>> However, in order to populate the list of platforms, I need to know
>> which strings sys.platform can return. I haven't found any
>> documentation on this, but I guess that I'm not looking in the
>> right  places! Do any of you know where I can find a list of
>> possible return  values from sys.platform? I'll settle for a Python
>> C source code  file, too, if it contains strings.
>
> I've browsed through the Python source, and I can't find this list. My
> best guess is that it's set by ./configure at compile-time, most
> likely using the output of 'uname' as source of information.
>
> Sybren

So there probably isn't even any kind of list that we can find?  
That's too bad. It's not a big loss to me, but I imagine that it's  
kind of annoying if you really need to add OS-specific code. Maybe we  
need to request that documentation for it is implemented in the  
official Python documentation once and for all. I guess that would  
require e-mailing a lot of people (like via this list) and asking  
them which operating system they're on and what their sys.platform  
tells them?

Michiel



More information about the Python-list mailing list