Skip to content

Instantly share code, notes, and snippets.

@binki
Created March 28, 2017 19:05
Show Gist options
  • Save binki/7a6c9398ebe26906b14340da00ad6eb9 to your computer and use it in GitHub Desktop.
Save binki/7a6c9398ebe26906b14340da00ad6eb9 to your computer and use it in GitHub Desktop.
How to ask python to stay open after running a script
#!/usr/bin/env python3
my_var = 23
C:\Users\ohnob\test>python -i blah.py
>>> print(my_var)
23
>>> quit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment