##// END OF EJS Templates
iplib.py => core/iplib.py and updated tests and imports.
Brian Granger -
Show More
@@ -43,7 +43,7 b' def prefilter_shell(self,line,continuation):'
43 43 return self._prefilter(line,continuation)
44 44
45 45 # Rebind this to be the new IPython prefilter:
46 from IPython.iplib import InteractiveShell
46 from IPython.core.iplib import InteractiveShell
47 47 InteractiveShell.prefilter = prefilter_shell
48 48 # Clean up the namespace.
49 49 del InteractiveShell,prefilter_shell
@@ -85,7 +85,7 b' Authors'
85 85
86 86 import re
87 87
88 from IPython.iplib import InteractiveShell
88 from IPython.core.iplib import InteractiveShell
89 89
90 90 PROMPT_RE = re.compile(r'(^[ \t]*>>> |^[ \t]*\.\.\. )')
91 91
@@ -52,7 +52,7 b' def prefilter_PQ(self,line,continuation):'
52 52 imported."""
53 53
54 54 from re import match
55 from IPython.iplib import InteractiveShell
55 from IPython.core.iplib import InteractiveShell
56 56
57 57 # This regexp is what does the real work
58 58 unit_split = match(r'\s*(\w+)\s*=\s*(-?\d*\.?\d*[eE]?-?\d*)\s+([a-zA-Z].*)',
@@ -74,7 +74,7 b' def prefilter_PQ(self,line,continuation):'
74 74 return InteractiveShell._prefilter(self,line,continuation)
75 75
76 76 # Rebind this to be the new IPython prefilter:
77 from IPython.iplib import InteractiveShell
77 from IPython.core.iplib import InteractiveShell
78 78 InteractiveShell.prefilter = prefilter_PQ
79 79
80 80 # Clean up the namespace.
@@ -3309,7 +3309,7 b' Defaulting color scheme to \'NoColor\'"""'
3309 3309
3310 3310 strip_from_start = map(re.compile,strip_re)
3311 3311
3312 from IPython import iplib
3312 from IPython.core import iplib
3313 3313 lines = []
3314 3314 print "Pasting code; enter '%s' alone on the line to stop." % sentinel
3315 3315 while 1:
@@ -38,7 +38,7 b' from IPython import ultraTB'
38 38 from IPython.core import ipapi
39 39 from IPython.Magic import Magic
40 40 from IPython.utils.genutils import Term,warn,error,flag_calls, ask_yes_no
41 from IPython.iplib import InteractiveShell
41 from IPython.core.iplib import InteractiveShell
42 42 from IPython.ipmaker import make_IPython
43 43 from IPython.ipstruct import Struct
44 44 from IPython.testing import decorators as testdec
@@ -593,8 +593,8 b' execfile'
593 593
594 594 # execfile example-magic.py
595 595
596 # Look at the examples in IPython/iplib.py for more details on how these magic
597 # functions need to process their arguments.
596 # Look at the examples in IPython/core/iplib.py for more details on how
597 # these magic functions need to process their arguments.
598 598
599 599 #---------------------------------------------------------------------------
600 600 # Section: aliases for system shell commands
1 NO CONTENT: file renamed from IPython/iplib.py to IPython/core/iplib.py
@@ -25,5 +25,9 b' def test_import_hooks():'
25 25 def test_import_ipapi():
26 26 from IPython.core import ipapi
27 27
28 def test_imort_iplib():
29 from IPython.core import iplib
30
31
28 32
29 33
@@ -13,7 +13,7 b' import tempfile'
13 13 import nose.tools as nt
14 14
15 15 # our own packages
16 from IPython import iplib
16 from IPython.core import iplib
17 17 from IPython.core import ipapi
18 18
19 19 #-----------------------------------------------------------------------------
@@ -140,7 +140,7 b' else:'
140 140 print """*** Type `gphelp` for help on the Gnuplot integration features."""
141 141
142 142 # Add the new magic functions to the class dict
143 from IPython.iplib import InteractiveShell
143 from IPython.core.iplib import InteractiveShell
144 144 InteractiveShell.magic_gpc = magic_gpc
145 145 InteractiveShell.magic_gp_set_default = magic_gp_set_default
146 146
@@ -7,7 +7,7 b' import sys'
7 7 from twisted.internet import reactor, threads
8 8
9 9 from IPython.ipmaker import make_IPython
10 from IPython.iplib import InteractiveShell
10 from IPython.core.iplib import InteractiveShell
11 11 from IPython.ipstruct import Struct
12 12 import Queue,thread,threading,signal
13 13 from signal import signal, SIGINT
@@ -80,7 +80,7 b' class PrefilterFrontEnd(LineFrontEndBase):'
80 80 # on exceptions (https://bugs.launchpad.net/bugs/337105)
81 81 # XXX: This is horrible: module-leve monkey patching -> side
82 82 # effects.
83 from IPython import iplib
83 from IPython.core import iplib
84 84 iplib.InteractiveShell.isthreaded = True
85 85
86 86 LineFrontEndBase.__init__(self, *args, **kwargs)
@@ -84,7 +84,7 b' def isolate_ipython0(func):'
84 84 ipython0.user_ns = user_ns
85 85 ipython0.user_global_ns = global_ns
86 86 # Undo the hack at creation of PrefilterFrontEnd
87 from IPython import iplib
87 from IPythoncore. import iplib
88 88 iplib.InteractiveShell.isthreaded = False
89 89 return out
90 90
@@ -26,6 +26,7 b' from thread_ex import ThreadEx'
26 26 try:
27 27 import IPython
28 28 from IPython.utils import genutils
29 from IPython.core import iplib
29 30 except Exception,e:
30 31 print "Error importing IPython (%s)" % str(e)
31 32 raise Exception, e
@@ -177,7 +178,7 b' class NonBlockingIPShell(object):'
177 178 self._IP.set_hook('shell_hook', self._shell)
178 179
179 180 #we replace the ipython default input command caller by our method
180 IPython.iplib.raw_input_original = self._raw_input_original
181 iplib.raw_input_original = self._raw_input_original
181 182 #we replace the ipython default exit command by our method
182 183 self._IP.exit = ask_exit_handler
183 184 #we replace the help command
@@ -49,7 +49,7 b' from IPython import Release'
49 49 from IPython.ipstruct import Struct
50 50 from IPython.OutputTrap import OutputTrap
51 51 from IPython.config.configloader import ConfigLoader
52 from IPython.iplib import InteractiveShell
52 from IPython.core.iplib import InteractiveShell
53 53 from IPython.usage import cmd_line_usage,interactive_usage
54 54 from IPython.utils.genutils import *
55 55
@@ -17,7 +17,7 b' __docformat__ = "restructuredtext en"'
17 17
18 18 import new
19 19
20 from IPython.iplib import InteractiveShell
20 from IPython.core.iplib import InteractiveShell
21 21 from IPython.Shell import MTInteractiveShell
22 22
23 23 from twisted.internet.defer import Deferred
@@ -39,7 +39,7 b' from IPython.kernel.fcutil import have_crypto'
39 39
40 40 # Create various ipython directories if they don't exist.
41 41 # This must be done before IPython.kernel.config is imported.
42 from IPython.iplib import user_setup
42 from IPython.core.iplib import user_setup
43 43 if os.name == 'posix':
44 44 rc_suffix = ''
45 45 else:
@@ -41,7 +41,7 b' from IPython.kernel.fcutil import check_furl_file_security'
41 41
42 42 # Create various ipython directories if they don't exist.
43 43 # This must be done before IPython.kernel.config is imported.
44 from IPython.iplib import user_setup
44 from IPython.core.iplib import user_setup
45 45 from IPython.utils.genutils import get_ipython_dir, get_log_dir, get_security_dir
46 46 if os.name == 'posix':
47 47 rc_suffix = ''
@@ -36,7 +36,7 b' from IPython.kernel.engineservice import EngineService'
36 36
37 37 # Create various ipython directories if they don't exist.
38 38 # This must be done before IPython.kernel.config is imported.
39 from IPython.iplib import user_setup
39 from IPython.core.iplib import user_setup
40 40 from IPython.utils.genutils import get_ipython_dir, get_log_dir, get_security_dir
41 41 if os.name == 'posix':
42 42 rc_suffix = ''
@@ -40,7 +40,7 b' excolors: plugin'
40 40 $(NOSE) IPython.core.excolors
41 41
42 42 iplib: plugin
43 $(NOSE) IPython.iplib
43 $(NOSE) IPython.core.iplib
44 44
45 45 strd: plugin
46 46 $(NOSE) IPython.strdispatch
@@ -195,7 +195,7 b' def start_ipython():'
195 195
196 196 # So that ipython magics and aliases can be doctested (they work by making
197 197 # a call into a global _ip object)
198 _ip = IPython.ipapi.get()
198 _ip = ipapi.get()
199 199 __builtin__._ip = _ip
200 200
201 201 # Modify the IPython system call with one that uses getoutput, so that we
@@ -133,6 +133,9 b' Where things will be moved'
133 133
134 134 * :file:`hooks.py`. Move to :file:`IPython.core`.
135 135
136 * :file:`ipapi.py`. Move to :file:`IPython.core`.
137
138
136 139
137 140 * :file:`Itpl.py`. Remove. Version already in :file:`IPython.external`.
138 141
@@ -176,7 +179,7 b' Where things will be moved'
176 179
177 180
178 181
179 * :file:`ipapi.py`. Move to :file:`IPython.core`.
182
180 183
181 184 * :file:`iplib.py`. Move to :file:`IPython.core`.
182 185
General Comments 0
You need to be logged in to leave comments. Login now