##// END OF EJS Templates
disallow no-prefix `ipython foo=bar` argument style....
disallow no-prefix `ipython foo=bar` argument style. This style is in rc1, but will be removed in rc2. Since they don't match any flag pattern, rc1-style arguments will be interpreted by IPython as files to be run. So `ipython gui=foo -i` will exec gui=foo, and pass '-i' to gui=foo. Presumably this file won't exist, so there will be an error: Error in executing file in user namespace: gui=foo Assignments *must* have two leading '-', as in: ipython --foo=bar all flags (non-assignments) can be specified with one or two leading '-', as in: ipython -i --pylab -pdb --pprint script.py or ipython --i -pylab --pdb -pprint script.py but help only reports two-leading, as single-leading options will likely be removed on moving to argparse, where they will be replaced by single-letter aliases. The common remaining invalid option will be: ipython -foo=bar and a suggestion for 'did you mean --foo=bar'? will be presented in these cases.

File last commit:

r3742:8fc0a2d6
r4197:368e365a
Show More
__init__.py
58 lines | 2.1 KiB | text/x-python | PythonLexer
# encoding: utf-8
"""
IPython.
IPython is a set of tools for interactive and exploratory computing in Python.
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2008-2010, IPython Development Team.
# Copyright (c) 2001-2007, Fernando Perez <fernando.perez@colorado.edu>
# Copyright (c) 2001, Janko Hauser <jhauser@zscout.de>
# Copyright (c) 2001, Nathaniel Gray <n8gray@caltech.edu>
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
from __future__ import absolute_import
import os
import sys
#-----------------------------------------------------------------------------
# Setup everything
#-----------------------------------------------------------------------------
# Don't forget to also update setup.py when this changes!
if sys.version[0:3] < '2.6':
raise ImportError('Python Version 2.6 or above is required for IPython.')
# Make it easy to import extensions - they are always directly on pythonpath.
# Therefore, non-IPython modules can be added to extensions directory.
# This should probably be in ipapp.py.
sys.path.append(os.path.join(os.path.dirname(__file__), "extensions"))
#-----------------------------------------------------------------------------
# Setup the top level names
#-----------------------------------------------------------------------------
from .config.loader import Config
from .core import release
from .core.application import Application
from .frontend.terminal.embed import embed
from .core.error import TryNext
from .core.interactiveshell import InteractiveShell
from .testing import test
from .utils.sysinfo import sys_info
# Release data
__author__ = ''
for author, email in release.authors.itervalues():
__author__ += author + ' <' + email + '>\n'
__license__ = release.license
__version__ = release.version