Show More
@@ -49,7 +49,7 b' sys.path.append(os.path.dirname(__file__) + "/Extensions")' | |||
|
49 | 49 | |
|
50 | 50 | # Define what gets imported with a 'from IPython import *' |
|
51 | 51 | __all__ = ['IPython.core.ipapi','utils.generics','utils.ipstruct', |
|
52 |
'core.release',' |
|
|
52 | 'core.release','core.shell'] | |
|
53 | 53 | |
|
54 | 54 | # Load __all__ in IPython namespace so that a simple 'import IPython' gives |
|
55 | 55 | # access to them via IPython.<name> |
@@ -58,7 +58,7 b' for name in __all__:' | |||
|
58 | 58 | #print 'Importing: ',name # dbg |
|
59 | 59 | __import__(name,glob,loc,[]) |
|
60 | 60 | |
|
61 | import Shell | |
|
61 | from IPython.core import shell | |
|
62 | 62 | |
|
63 | 63 | # Release data |
|
64 | 64 | from IPython.core import release # do it explicitly so pydoc can see it - pydoc bug |
@@ -679,7 +679,7 b' def make_session(user_ns = None, shellclass = None):' | |||
|
679 | 679 | |
|
680 | 680 | WARNING: This should *not* be run when a session exists already.""" |
|
681 | 681 | |
|
682 |
import IPython. |
|
|
682 | import IPython.core.shell | |
|
683 | 683 | if shellclass is None: |
|
684 |
return IPython. |
|
|
684 | return IPython.core.shell.start(user_ns) | |
|
685 | 685 | return shellclass(user_ns = user_ns) |
|
1 | NO CONTENT: file renamed from IPython/Shell.py to IPython/core/shell.py |
@@ -57,3 +57,6 b' def test_import_release():' | |||
|
57 | 57 | |
|
58 | 58 | def test_import_shadowns(): |
|
59 | 59 | from IPython.core import shadowns |
|
60 | ||
|
61 | def test_import_shell(): | |
|
62 | from IPython.core import shell |
@@ -156,11 +156,11 b' class NonBlockingIPShell(object):' | |||
|
156 | 156 | #Hack to save sys.displayhook, because ipython seems to overwrite it... |
|
157 | 157 | self.sys_displayhook_ori = sys.displayhook |
|
158 | 158 | |
|
159 |
self._IP = IPython. |
|
|
159 | self._IP = IPython.shell.make_IPython( | |
|
160 | 160 | argv,user_ns=user_ns, |
|
161 | 161 | user_global_ns=user_global_ns, |
|
162 | 162 | embedded=True, |
|
163 |
shell_class=IPython. |
|
|
163 | shell_class=IPython.shell.InteractiveShell) | |
|
164 | 164 | |
|
165 | 165 | #we save ipython0 displayhook and we restore sys.displayhook |
|
166 | 166 | self.displayhook = sys.displayhook |
@@ -470,7 +470,7 b' class NonBlockingIPShell(object):' | |||
|
470 | 470 | ''' |
|
471 | 471 | |
|
472 | 472 | orig_stdout = sys.stdout |
|
473 |
sys.stdout = IPython. |
|
|
473 | sys.stdout = IPython.shell.Term.cout | |
|
474 | 474 | #self.sys_displayhook_ori = sys.displayhook |
|
475 | 475 | #sys.displayhook = self.displayhook |
|
476 | 476 |
@@ -18,7 +18,7 b' __docformat__ = "restructuredtext en"' | |||
|
18 | 18 | import new |
|
19 | 19 | |
|
20 | 20 | from IPython.core.iplib import InteractiveShell |
|
21 |
from IPython. |
|
|
21 | from IPython.core.shell import MTInteractiveShell | |
|
22 | 22 | |
|
23 | 23 | from twisted.internet.defer import Deferred |
|
24 | 24 |
@@ -195,7 +195,7 b' def make_runners():' | |||
|
195 | 195 | """ |
|
196 | 196 | |
|
197 | 197 | # This omits additional top-level modules that should not be doctested. |
|
198 |
# XXX: |
|
|
198 | # XXX: shell.py is also ommited because of a bug in the skip_doctest | |
|
199 | 199 | # decorator. See ticket https://bugs.launchpad.net/bugs/366209 |
|
200 | 200 | top_mod = \ |
|
201 | 201 | ['backgroundjobs.py', 'coloransi.py', 'completer.py', 'configloader.py', |
@@ -209,7 +209,7 b' def make_runners():' | |||
|
209 | 209 | 'shellglobals.py', 'strdispatch.py', 'twshell.py', |
|
210 | 210 | 'ultraTB.py', 'upgrade_dir.py', 'usage.py', 'wildcard.py', |
|
211 | 211 | # See note above for why this is skipped |
|
212 |
# ' |
|
|
212 | # 'shell.py', | |
|
213 | 213 | 'winconsole.py'] |
|
214 | 214 | |
|
215 | 215 | if have_pexpect: |
@@ -185,7 +185,7 b' def start_ipython():' | |||
|
185 | 185 | |
|
186 | 186 | # Start IPython instance. We customize it to start with minimal frills. |
|
187 | 187 | user_ns,global_ns = ipapi.make_user_namespaces(ipnsdict(),dict()) |
|
188 |
IPython. |
|
|
188 | IPython.shell.IPShell(argv,user_ns,global_ns) | |
|
189 | 189 | |
|
190 | 190 | # Deactivate the various python system hooks added by ipython for |
|
191 | 191 | # interactive convenience so we don't confuse the doctest system |
@@ -113,7 +113,7 b' A WARNING ABOUT SIGNALS AND THREADS' | |||
|
113 | 113 | interpreter itself, and it comes from the difficulty of writing |
|
114 | 114 | portable signal/threaded code. If any user is an expert on this topic |
|
115 | 115 | and can suggest a better solution, I would love to hear about it. In |
|
116 |
the IPython sources, look at the |
|
|
116 | the IPython sources, look at the shell.py module, and in particular at | |
|
117 | 117 | the runcode() method. |
|
118 | 118 | |
|
119 | 119 | REGULAR OPTIONS |
General Comments 0
You need to be logged in to leave comments.
Login now