Created
August 4, 2017 12:19
-
-
Save Swarchal/bb08f805d40a436c47b234d85f9a7515 to your computer and use it in GitHub Desktop.
test if running within ipython
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def run_from_ipython(): | |
try: | |
__IPYTHON__ | |
return True | |
except NameError: | |
return False |
Author
Swarchal
commented
Aug 4, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment