I am integrating with an existing cross-platform system that provides 
different shell scripts and/or batch files for each environment.  Normally 
the selection is performed manually but my utility needs to automate this. 
To select the correct utility I need to know what platform my code is 
running on.

"Paul Watson" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Ian F. Hood wrote:
>> Hi
>> In typically windows environments I have used:
>>     if 'Windows' in os.environ['OS']...
>> to prove it, but now I need to properly support different environments.
>> To do so I must accurately determine what system the python instance is
>> running on (linux, win, mac, etc).
>> Is there a best practises way to do this?
>> TIA
>> Ian
>
> The more significant question is "why" do you want to do this?  Are you
> writing an asset management tool?  Do you just want to tell the user
> what operating system they are using?  The reason may lead to a
> different solution.
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to