##// END OF EJS Templates
BUG: Fix minor frontend bugs
Gael Varoquaux -
Show More
@@ -22,9 +22,9 b' __docformat__ = "restructuredtext en"'
22 22 # Imports
23 23 #-------------------------------------------------------------------------------
24 24 import sys
25
26 from linefrontendbase import LineFrontEndBase, common_prefix
27 from frontendbase import FrontEndBase
25 import pydoc
26 import os
27 import __builtin__
28 28
29 29 from IPython.ipmaker import make_IPython
30 30 from IPython.ipapi import IPApi
@@ -33,9 +33,8 b' from IPython.kernel.core.redirector_output_trap import RedirectorOutputTrap'
33 33 from IPython.kernel.core.sync_traceback_trap import SyncTracebackTrap
34 34
35 35 from IPython.genutils import Term
36 import pydoc
37 import os
38 import sys
36
37 from linefrontendbase import LineFrontEndBase, common_prefix
39 38
40 39
41 40 def mk_system_call(system_call_function, command):
@@ -85,10 +84,16 b' class PrefilterFrontEnd(LineFrontEndBase):'
85 84 if ipython0 is None:
86 85 # Instanciate an IPython0 interpreter to be able to use the
87 86 # prefiltering.
87 # Suppress all key input, to avoid waiting
88 def my_rawinput(x=None):
89 return '\n'
90 old_rawinput = __builtin__.raw_input
91 __builtin__.raw_input = my_rawinput
88 92 # XXX: argv=[] is a bit bold.
89 93 ipython0 = make_IPython(argv=[],
90 94 user_ns=self.shell.user_ns,
91 95 user_global_ns=self.shell.user_global_ns)
96 __builtin__.raw_input = old_rawinput
92 97 self.ipython0 = ipython0
93 98 # Set the pager:
94 99 self.ipython0.set_hook('show_in_pager',
@@ -100,6 +105,7 b' class PrefilterFrontEnd(LineFrontEndBase):'
100 105 self._ip.system = self.system_call
101 106 # XXX: Muck around with magics so that they work better
102 107 # in our environment
108 if not sys.platform.startswith('win'):
103 109 self.ipython0.magic_ls = mk_system_call(self.system_call,
104 110 'ls -CF')
105 111 # And now clean up the mess created by ipython0
General Comments 0
You need to be logged in to leave comments. Login now