Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Prevent ipython.py launcher from being imported. #702

Merged
merged 1 commit into from

2 participants

@stefanv

Suggest importing IPython instead.

@fperez
Owner

Thanks!

@fperez fperez merged commit afb8686 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 15, 2011
  1. @stefanv
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 0 deletions.
  1. +5 −0 ipython.py
View
5 ipython.py
@@ -7,6 +7,10 @@
to facilitate non-root 'zero-installation' (just copy the source tree
somewhere and run ipython.py) and development. """
+if __name__ != "__main__":
+ raise RuntimeError('You are trying to import the ipython.py executable. '
+ 'Did you mean to call "import IPython" (case-sensitive) instead?')
+
# Ensure that the imported IPython is the local one, not a system-wide one
import os, sys
this_dir = os.path.dirname(sys.argv[0])
@@ -16,3 +20,4 @@
execfile(os.path.join(
this_dir, 'IPython', 'scripts', 'ipython'
))
+
Something went wrong with that request. Please try again.