When you want a Python interpreter you type python (or ipython if you are trendy). You use Magpy python code by simply importing it.
Unlike some other frameworks, say Django for example, there is no automated magic with environment variables, everything is just standard Python.