I have a python script that is running on OSX; I use PyObjC library to perform some operations. Now, I would like to run the same script on windows; although there is no PyObjC on Windows, so when I call the module; I get a failure as expected.
Is there a way in Python to tell the interpreter that if I am running on OSX, it should load that module, otherwise ignore it? Kinda like the IF statements in a C++ include section; which allow you to fall back to a different library, based on the hardware or software on which that program is running on?
EDIT: I know how to find my OS; I did not ask how to find the Os on which my script run upon. The question was about how to import modules selectively, so I won't get a failure when running on a OS that does not require that module.