diff --git a/IPython/frontend/prefilterfrontend.py b/IPython/frontend/prefilterfrontend.py index 11b7cdd..a9b0042 100644 --- a/IPython/frontend/prefilterfrontend.py +++ b/IPython/frontend/prefilterfrontend.py @@ -38,6 +38,13 @@ def xterm_system(command): # """echo \\"\x1b]0;%s (finished -- press enter to close)\x07\\" ; """read foo;"\' """) % (command, command) ) +def system_call(command): + """ Temporary hack for aliases + """ + def my_system_call(args): + os.system("%s %s" % (command, args)) + return my_system_call + #------------------------------------------------------------------------------- # Frontend class using ipython0 to do the prefiltering. #------------------------------------------------------------------------------- @@ -59,6 +66,9 @@ class PrefilterFrontEnd(LineFrontEndBase): # Make sure the raw system call doesn't get called, as we don't # have a stdin accessible. self._ip.system = xterm_system + # XXX: Muck around with magics so that they work better + # in our environment + self.ipython0.magic_ls = system_call('ls -CF') self.shell.output_trap = RedirectorOutputTrap( out_callback=self.write, err_callback=self.write, diff --git a/IPython/frontend/wx/console_widget.py b/IPython/frontend/wx/console_widget.py index 251312c..e8dc363 100644 --- a/IPython/frontend/wx/console_widget.py +++ b/IPython/frontend/wx/console_widget.py @@ -201,8 +201,6 @@ class ConsoleWidget(editwindow.EditWindow): # an infinit loop title = self.title_pat.split(text) if len(title)>1: - import sys - print >>sys.__stderr__, "title :", title self.title = title[-2] text = self.title_pat.sub('', text) @@ -216,7 +214,7 @@ class ConsoleWidget(editwindow.EditWindow): self.StartStyling(self.GetLength(), 0xFF) self.AppendText(text) - if ansi_tag == '0': + if ansi_tag not in self.ANSI_STYLES: style = 0 else: style = self.ANSI_STYLES[ansi_tag][0]