import os, IPython os.environ['PYTHONSTARTUP'] = '' # Prevent running this again IPython.start_ipython() raise SystemExit