##// END OF EJS Templates
BF - allow nose with-doctest setting in environment...
BF - allow nose with-doctest setting in environment IPDoctest replaces the normal doctest plugin. Previously we did this by initializing the builtin plugins but skipping the doctest plugin. However, if the user has a noserc file with 'with-doctest=1' or the environment variable 'NOSE_WITH_DOCTEST', then nose will try and initialize the doctest plugin when it isn't there, and barf. This commit defers the removal of the doctest plugin to the configuration stage, so doctest can be enabled before it is thrown away by us.

File last commit:

r4562:afb86869
r4567:8274f38c
Show More
ipython.py
23 lines | 813 B | text/x-python | PythonLexer
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""IPython -- An enhanced Interactive Python
The actual ipython script to be installed with 'python setup.py install' is
in './scripts' directory. This file is here (ipython source root directory)
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])
sys.path.insert(0, this_dir)
# Now proceed with execution
execfile(os.path.join(
this_dir, 'IPython', 'scripts', 'ipython'
))