##// END OF EJS Templates
Better fonts on MacOSX....
gvaroquaux -
Show More
@@ -107,6 +107,8 b' This is the wx frontend, by Gael Varoquaux. This is EXPERIMENTAL code."""'
107
107
108
108
109 def execute(self, python_string, raw_string=None):
109 def execute(self, python_string, raw_string=None):
110 if self.debug:
111 print 'Executing Python code:', repr(python_string)
110 self.capture_output()
112 self.capture_output()
111 LineFrontEndBase.execute(self, python_string,
113 LineFrontEndBase.execute(self, python_string,
112 raw_string=raw_string)
114 raw_string=raw_string)
@@ -178,7 +180,8 b' This is the wx frontend, by Gael Varoquaux. This is EXPERIMENTAL code."""'
178 self.last_result = dict(number=self.prompt_number)
180 self.last_result = dict(number=self.prompt_number)
179 try:
181 try:
180 for line in input_string.split('\n'):
182 for line in input_string.split('\n'):
181 filtered_lines.append(self.ipython0.prefilter(line, False))
183 filtered_lines.append(
184 self.ipython0.prefilter(line, False).rstrip())
182 except:
185 except:
183 # XXX: probably not the right thing to do.
186 # XXX: probably not the right thing to do.
184 self.ipython0.showsyntaxerror()
187 self.ipython0.showsyntaxerror()
@@ -186,6 +189,7 b' This is the wx frontend, by Gael Varoquaux. This is EXPERIMENTAL code."""'
186 finally:
189 finally:
187 self.release_output()
190 self.release_output()
188
191
192 # Clean up the trailing whitespace, to avoid indentation errors
189 filtered_string = '\n'.join(filtered_lines)
193 filtered_string = '\n'.join(filtered_lines)
190 return filtered_string
194 return filtered_string
191
195
@@ -34,6 +34,8 b' import re'
34 # screen: this should not be editable by the user.
34 # screen: this should not be editable by the user.
35
35
36 _DEFAULT_SIZE = 10
36 _DEFAULT_SIZE = 10
37 if sys.platform == 'darwin':
38 _DEFAULT_STYLE = 12
37
39
38 _DEFAULT_STYLE = {
40 _DEFAULT_STYLE = {
39 'stdout' : 'fore:#0000FF',
41 'stdout' : 'fore:#0000FF',
@@ -54,6 +54,9 b' class IPythonXController(WxController):'
54 wx.CallAfter(self.new_prompt,
54 wx.CallAfter(self.new_prompt,
55 self.input_prompt_template.substitute(
55 self.input_prompt_template.substitute(
56 number=self.last_result['number'] + 1))
56 number=self.last_result['number'] + 1))
57 else:
58 wx.CallAfter(wx.GetApp().Exit)
59 self.write('Exiting ...', refresh=False)
57
60
58
61
59 def do_exit(self):
62 def do_exit(self):
General Comments 0
You need to be logged in to leave comments. Login now