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

Stefan van der Walt Fernando Perez
Stefan van der Walt

Suggest importing IPython instead.

Fernando Perez
Owner

Thanks!

Fernando Perez 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. Stefan van der Walt
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 0 deletions.
  1. +5 −0 ipython.py
5 ipython.py
View
@@ -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.