Show More
@@ -38,6 +38,13 def xterm_system(command): | |||
|
38 | 38 | # """echo \\"\x1b]0;%s (finished -- press enter to close)\x07\\" ; |
|
39 | 39 | """read foo;"\' """) % (command, command) ) |
|
40 | 40 | |
|
41 | def system_call(command): | |
|
42 | """ Temporary hack for aliases | |
|
43 | """ | |
|
44 | def my_system_call(args): | |
|
45 | os.system("%s %s" % (command, args)) | |
|
46 | return my_system_call | |
|
47 | ||
|
41 | 48 | #------------------------------------------------------------------------------- |
|
42 | 49 | # Frontend class using ipython0 to do the prefiltering. |
|
43 | 50 | #------------------------------------------------------------------------------- |
@@ -59,6 +66,9 class PrefilterFrontEnd(LineFrontEndBase): | |||
|
59 | 66 | # Make sure the raw system call doesn't get called, as we don't |
|
60 | 67 | # have a stdin accessible. |
|
61 | 68 | self._ip.system = xterm_system |
|
69 | # XXX: Muck around with magics so that they work better | |
|
70 | # in our environment | |
|
71 | self.ipython0.magic_ls = system_call('ls -CF') | |
|
62 | 72 | self.shell.output_trap = RedirectorOutputTrap( |
|
63 | 73 | out_callback=self.write, |
|
64 | 74 | err_callback=self.write, |
@@ -201,8 +201,6 class ConsoleWidget(editwindow.EditWindow): | |||
|
201 | 201 | # an infinit loop |
|
202 | 202 | title = self.title_pat.split(text) |
|
203 | 203 | if len(title)>1: |
|
204 | import sys | |
|
205 | print >>sys.__stderr__, "title :", title | |
|
206 | 204 | self.title = title[-2] |
|
207 | 205 | |
|
208 | 206 | text = self.title_pat.sub('', text) |
@@ -216,7 +214,7 class ConsoleWidget(editwindow.EditWindow): | |||
|
216 | 214 | self.StartStyling(self.GetLength(), 0xFF) |
|
217 | 215 | self.AppendText(text) |
|
218 | 216 | |
|
219 |
if ansi_tag |
|
|
217 | if ansi_tag not in self.ANSI_STYLES: | |
|
220 | 218 | style = 0 |
|
221 | 219 | else: |
|
222 | 220 | style = self.ANSI_STYLES[ansi_tag][0] |
General Comments 0
You need to be logged in to leave comments.
Login now