How Can I Determine the Operating System with Python?

Jill Obsidian obsidian_genius at yahoo.com
Wed Mar 20 20:33:44 EST 2002


I have need to write some Python scripts that run on Windows as well
as Linux/Unix.

In some instances I will be making os.system() calls to execute
applications installed locally on the machine.

How can I put a check in my script which will allow me to determine
whether I'm running on Windows or Linux at execution time?

Thanks,
Jill



More information about the Python-list mailing list