Show More
@@ -30,6 +30,21 b' import wx.stc as stc' | |||
|
30 | 30 | import re |
|
31 | 31 | from StringIO import StringIO |
|
32 | 32 | |
|
33 | import sys | |
|
34 | import codecs | |
|
35 | import locale | |
|
36 | for enc in (locale.getpreferredencoding(), | |
|
37 | sys.getfilesystemencoding(), | |
|
38 | sys.getdefaultencoding()): | |
|
39 | try: | |
|
40 | codecs.lookup(enc) | |
|
41 | ENCODING = enc | |
|
42 | break | |
|
43 | except LookupError: | |
|
44 | pass | |
|
45 | else: | |
|
46 | ENCODING = 'utf-8' | |
|
47 | ||
|
33 | 48 | from ipshell_nonblocking import NonBlockingIPShell |
|
34 | 49 | |
|
35 | 50 | class WxNonBlockingIPShell(NonBlockingIPShell): |
@@ -604,7 +619,7 b' class IPShellWidget(wx.Panel):' | |||
|
604 | 619 | self.text_ctrl.write('\n') |
|
605 | 620 | lines_to_execute = lines.replace('\t',' '*4) |
|
606 | 621 | lines_to_execute = lines_to_execute.replace('\r','') |
|
607 |
self.IP.doExecute(lines_to_execute.encode( |
|
|
622 | self.IP.doExecute(lines_to_execute.encode(ENCODING)) | |
|
608 | 623 | self.updateHistoryTracker(lines) |
|
609 | 624 | self.setCurrentState('WAIT_END_OF_EXECUTION') |
|
610 | 625 |
General Comments 0
You need to be logged in to leave comments.
Login now