Skip to content

Instantly share code, notes, and snippets.

@andresriancho
Created January 27, 2015 21:40
Show Gist options
  • Save andresriancho/c393cd26156182f9a34f to your computer and use it in GitHub Desktop.
Save andresriancho/c393cd26156182f9a34f to your computer and use it in GitHub Desktop.
Shouldn't be there.
# Unfortunately, the main ipython launch script historically had no
# "if __name__ == '__main__'" guard, so we work around that
# by treating it like a __main__.py file
# See https://github.com/ipython/ipython/issues/4698
main_name = os.path.splitext(os.path.basename(main_path))[0]
if main_name == 'ipython':
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment