how to find the name of the current operating system
best way seems to be to use:

if sys.platform == "darwin":
The Python Standard Library — Python v2.6.2 documentation
16.1. os — Miscellaneous operating system interfaces — Python v2.6.2 documentation
python determine if operating system is mac - Google Search
how to determine Operating System in Use? - Python answers