Executing a string of commands from the command line

$ python -c "import HasyUtils;HasyUtils.checkMacroServerEnvironment()"

The parameter is always the name of the script.