30 def __init__(self,argv=None,user_ns=None,user_global_ns=None,
31 cin=None, cout=None,cerr=None, input_func=None):
34 IPython.iplib.raw_input_original = input_func
36 IPython.Shell.Term.cin = cin
38 IPython.Shell.Term.cout = cout
40 IPython.Shell.Term.cerr = cerr
43 IPython.iplib.raw_input =
lambda x:
None
44 self.
term = IPython.genutils.IOTerm(cin=cin, cout=cout, cerr=cerr)
45 os.environ[
'TERM'] =
'dumb'
46 excepthook = sys.excepthook
47 self.
IP = IPython.Shell.make_IPython(argv,
49 user_global_ns=user_global_ns,
51 shell_class=IPython.Shell.InteractiveShell)
52 self.
IP.system =
lambda cmd: self.
shell(self.
IP.var_expand(cmd),
53 header=
'IPython system call: ',
54 verbose=self.
IP.rc.system_verbose)
56 self.
ip = IPython.core.getipython.get_ipython()
57 self.
ip.magic(
'colors LightBG')
58 sys.excepthook = excepthook
125 def shell(self, cmd,verbose=0,debug=0,header=''):