Skip to content

Commit afe1263

Browse files
committed
Moving and renaming in preparation of subclassing InteractiveShell.
* IPython/scripts/ipython -> IPython/frontend/terminal/scripts * IPython.core.ipapp -> IPython.frontend.terminal.ipapp * IPython.core.embed -> IPython.frontend.terminal.embed * IPython.core.iplib -> IPython.core.interactiveshell
1 parent f19d51d commit afe1263

35 files changed

Lines changed: 44 additions & 50 deletions

IPython/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,9 @@
4040
from .config.loader import Config
4141
from .core import release
4242
from .core.application import Application
43-
from .core.ipapp import IPythonApp
44-
from .core.embed import embed
43+
from .frontend.terminal.embed import embed
4544
from .core.error import TryNext
46-
from .core.iplib import InteractiveShell
45+
from .core.interactiveshell import InteractiveShell
4746
from .testing import test
4847

4948
from .lib import (

IPython/core/alias.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class AliasManager(Configurable):
104104

105105
default_aliases = List(default_aliases(), config=True)
106106
user_aliases = List(default_value=[], config=True)
107-
shell = Instance('IPython.core.iplib.InteractiveShellABC')
107+
shell = Instance('IPython.core.interactiveshell.InteractiveShellABC')
108108

109109
def __init__(self, shell=None, config=None):
110110
super(AliasManager, self).__init__(shell=shell, config=config)

IPython/core/builtin_trap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class __BuiltinUndefined(object): pass
3737

3838
class BuiltinTrap(Configurable):
3939

40-
shell = Instance('IPython.core.iplib.InteractiveShellABC')
40+
shell = Instance('IPython.core.interactiveshell.InteractiveShellABC')
4141

4242
def __init__(self, shell=None):
4343
super(BuiltinTrap, self).__init__(shell=shell, config=None)

IPython/core/debugger.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def __init__(self,color_scheme='NoColor',completekey=None,
184184

185185
if self.is_pydb:
186186

187-
# iplib.py's ipalias seems to want pdb's checkline
187+
# interactiveshell.py's ipalias seems to want pdb's checkline
188188
# which located in pydb.fn
189189
import pydb.fns
190190
self.checkline = lambda filename, lineno: \

IPython/core/extensions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def load_ipython_extension(ipython):
5353
is added to ``sys.path`` automatically.
5454
"""
5555

56-
shell = Instance('IPython.core.iplib.InteractiveShellABC')
56+
shell = Instance('IPython.core.interactiveshell.InteractiveShellABC')
5757

5858
def __init__(self, shell=None, config=None):
5959
super(ExtensionManager, self).__init__(shell=shell, config=config)

IPython/core/ipapi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525

2626
def get():
2727
"""Get the global InteractiveShell instance."""
28-
from IPython.core.iplib import InteractiveShell
28+
from IPython.core.interactiveshell import InteractiveShell
2929
return InteractiveShell.instance()
3030

IPython/core/magic.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1699,7 +1699,7 @@ def magic_run(self, parameter_s ='',runner=None,
16991699
# set the __file__ global in the script's namespace
17001700
prog_ns['__file__'] = filename
17011701

1702-
# pickle fix. See iplib for an explanation. But we need to make sure
1702+
# pickle fix. See interactiveshell for an explanation. But we need to make sure
17031703
# that, if we overwrite __main__, we replace it at the end
17041704
main_mod_name = prog_ns['__name__']
17051705

@@ -3327,10 +3327,10 @@ def _rerun_pasted(self):
33273327
def _get_pasted_lines(self, sentinel):
33283328
""" Yield pasted lines until the user enters the given sentinel value.
33293329
"""
3330-
from IPython.core import iplib
3330+
from IPython.core import interactiveshell
33313331
print "Pasting code; enter '%s' alone on the line to stop." % sentinel
33323332
while True:
3333-
l = iplib.raw_input_original(':')
3333+
l = interactiveshell.raw_input_original(':')
33343334
if l == sentinel:
33353335
return
33363336
else:

IPython/core/prefilter.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ class PrefilterManager(Configurable):
210210
"""
211211

212212
multi_line_specials = CBool(True, config=True)
213-
shell = Instance('IPython.core.iplib.InteractiveShellABC')
213+
shell = Instance('IPython.core.interactiveshell.InteractiveShellABC')
214214

215215
def __init__(self, shell=None, config=None):
216216
super(PrefilterManager, self).__init__(shell=shell, config=config)
@@ -453,7 +453,7 @@ class PrefilterTransformer(Configurable):
453453
priority = Int(100, config=True)
454454
# Transformers don't currently use shell or prefilter_manager, but as we
455455
# move away from checkers and handlers, they will need them.
456-
shell = Instance('IPython.core.iplib.InteractiveShellABC')
456+
shell = Instance('IPython.core.interactiveshell.InteractiveShellABC')
457457
prefilter_manager = Instance('IPython.core.prefilter.PrefilterManager')
458458
enabled = Bool(True, config=True)
459459

@@ -561,7 +561,7 @@ class PrefilterChecker(Configurable):
561561
"""Inspect an input line and return a handler for that line."""
562562

563563
priority = Int(100, config=True)
564-
shell = Instance('IPython.core.iplib.InteractiveShellABC')
564+
shell = Instance('IPython.core.interactiveshell.InteractiveShellABC')
565565
prefilter_manager = Instance('IPython.core.prefilter.PrefilterManager')
566566
enabled = Bool(True, config=True)
567567

@@ -754,7 +754,7 @@ class PrefilterHandler(Configurable):
754754

755755
handler_name = Str('normal')
756756
esc_strings = List([])
757-
shell = Instance('IPython.core.iplib.InteractiveShellABC')
757+
shell = Instance('IPython.core.interactiveshell.InteractiveShellABC')
758758
prefilter_manager = Instance('IPython.core.prefilter.PrefilterManager')
759759

760760
def __init__(self, shell=None, prefilter_manager=None, config=None):

IPython/core/splitinput.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
# RegExp for splitting line contents into pre-char//first word-method//rest.
3131
# For clarity, each group in on one line.
3232

33-
# WARNING: update the regexp if the escapes in iplib are changed, as they
33+
# WARNING: update the regexp if the escapes in interactiveshell are changed, as they
3434
# are hardwired in.
3535

3636
# Although it's not solely driven by the regex, note that:

0 commit comments

Comments
 (0)