diff --git a/IPython/__init__.py b/IPython/__init__.py index 9b144f9..2d6b9eb 100644 --- a/IPython/__init__.py +++ b/IPython/__init__.py @@ -49,7 +49,7 @@ sys.path.append(os.path.dirname(__file__) + "/Extensions") # Define what gets imported with a 'from IPython import *' __all__ = ['IPython.core.ipapi','utils.generics','utils.ipstruct', - 'core.release','Shell'] + 'core.release','core.shell'] # Load __all__ in IPython namespace so that a simple 'import IPython' gives # access to them via IPython. @@ -58,7 +58,7 @@ for name in __all__: #print 'Importing: ',name # dbg __import__(name,glob,loc,[]) -import Shell +from IPython.core import shell # Release data from IPython.core import release # do it explicitly so pydoc can see it - pydoc bug diff --git a/IPython/core/ipapi.py b/IPython/core/ipapi.py index bf246a1..fbf3cfc 100644 --- a/IPython/core/ipapi.py +++ b/IPython/core/ipapi.py @@ -679,7 +679,7 @@ def make_session(user_ns = None, shellclass = None): WARNING: This should *not* be run when a session exists already.""" - import IPython.Shell + import IPython.core.shell if shellclass is None: - return IPython.Shell.start(user_ns) + return IPython.core.shell.start(user_ns) return shellclass(user_ns = user_ns) diff --git a/IPython/Shell.py b/IPython/core/shell.py similarity index 100% rename from IPython/Shell.py rename to IPython/core/shell.py diff --git a/IPython/core/tests/test_imports.py b/IPython/core/tests/test_imports.py index f3dc4ca..6ce9f11 100644 --- a/IPython/core/tests/test_imports.py +++ b/IPython/core/tests/test_imports.py @@ -57,3 +57,6 @@ def test_import_release(): def test_import_shadowns(): from IPython.core import shadowns + +def test_import_shell(): + from IPython.core import shell diff --git a/IPython/gui/wx/ipshell_nonblocking.py b/IPython/gui/wx/ipshell_nonblocking.py index 5dd611c..aef5206 100644 --- a/IPython/gui/wx/ipshell_nonblocking.py +++ b/IPython/gui/wx/ipshell_nonblocking.py @@ -156,11 +156,11 @@ class NonBlockingIPShell(object): #Hack to save sys.displayhook, because ipython seems to overwrite it... self.sys_displayhook_ori = sys.displayhook - self._IP = IPython.Shell.make_IPython( + self._IP = IPython.shell.make_IPython( argv,user_ns=user_ns, user_global_ns=user_global_ns, embedded=True, - shell_class=IPython.Shell.InteractiveShell) + shell_class=IPython.shell.InteractiveShell) #we save ipython0 displayhook and we restore sys.displayhook self.displayhook = sys.displayhook @@ -470,7 +470,7 @@ class NonBlockingIPShell(object): ''' orig_stdout = sys.stdout - sys.stdout = IPython.Shell.Term.cout + sys.stdout = IPython.shell.Term.cout #self.sys_displayhook_ori = sys.displayhook #sys.displayhook = self.displayhook diff --git a/IPython/kernel/magic.py b/IPython/kernel/magic.py index 30b4794..4eab117 100644 --- a/IPython/kernel/magic.py +++ b/IPython/kernel/magic.py @@ -18,7 +18,7 @@ __docformat__ = "restructuredtext en" import new from IPython.core.iplib import InteractiveShell -from IPython.Shell import MTInteractiveShell +from IPython.core.shell import MTInteractiveShell from twisted.internet.defer import Deferred diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index a536831..5bf5793 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -195,7 +195,7 @@ def make_runners(): """ # This omits additional top-level modules that should not be doctested. - # XXX: Shell.py is also ommited because of a bug in the skip_doctest + # XXX: shell.py is also ommited because of a bug in the skip_doctest # decorator. See ticket https://bugs.launchpad.net/bugs/366209 top_mod = \ ['backgroundjobs.py', 'coloransi.py', 'completer.py', 'configloader.py', @@ -209,7 +209,7 @@ def make_runners(): 'shellglobals.py', 'strdispatch.py', 'twshell.py', 'ultraTB.py', 'upgrade_dir.py', 'usage.py', 'wildcard.py', # See note above for why this is skipped - # 'Shell.py', + # 'shell.py', 'winconsole.py'] if have_pexpect: diff --git a/IPython/testing/plugin/ipdoctest.py b/IPython/testing/plugin/ipdoctest.py index b4e5fdf..24fa734 100644 --- a/IPython/testing/plugin/ipdoctest.py +++ b/IPython/testing/plugin/ipdoctest.py @@ -185,7 +185,7 @@ def start_ipython(): # Start IPython instance. We customize it to start with minimal frills. user_ns,global_ns = ipapi.make_user_namespaces(ipnsdict(),dict()) - IPython.Shell.IPShell(argv,user_ns,global_ns) + IPython.shell.IPShell(argv,user_ns,global_ns) # Deactivate the various python system hooks added by ipython for # interactive convenience so we don't confuse the doctest system diff --git a/IPython/usage.py b/IPython/usage.py index 7620d96..39425e7 100644 --- a/IPython/usage.py +++ b/IPython/usage.py @@ -113,7 +113,7 @@ A WARNING ABOUT SIGNALS AND THREADS interpreter itself, and it comes from the difficulty of writing portable signal/threaded code. If any user is an expert on this topic and can suggest a better solution, I would love to hear about it. In - the IPython sources, look at the Shell.py module, and in particular at + the IPython sources, look at the shell.py module, and in particular at the runcode() method. REGULAR OPTIONS