Sorry; Thunderbird glitched on me. Reposting, hopefully without formatting oddnesses.
Mateusz Paprocki wrote: > could you please try once again, this time with the attached > patch applied, it should fix the problem. Now this is odd… I applied the patches (by hand; don’t know of a handy patch util for Windows) and re-ran the test: > C:\Users\chesky>python c:\Hacking\Python26\Scripts\isympy -p Unicode > C:\Hacking\Python26\lib\site-packages\IPython\Magic.py:38: > DeprecationWarning: the sets module is deprecated > from sets import Set > Python 2.6.2 console for SymPy 0.6.4 > > These commands were executed: > >>> from __future__ import division > >>> from sympy import * > >>> x, y, z = symbols('xyz') > >>> k, m, n = symbols('kmn', integer=True) > >>> f, g, h = map(Function, 'fgh') > > Documentation can be found at http://sympy.org/ > > In [1]: print(u'\u2320') > ⌠ > > In [2]: a = Symbol("alpha") > > In [3]: a > Out[3]: α > > In [4]: b = Symbol("beta") > > In [5]: b > Out[5]: ERROR: An unexpected error occurred while tokenizing input > The following traceback may be corrupted or invalid > The error message is: ('EOF in multi-line statement', (15, 0)) > > --------------------------------------------------------------------------- > UnicodeEncodeError Traceback (most recent call last) > > C:\Users\chesky\<ipython console> in <module>() > > C:\Hacking\Python26\lib\site-packages\IPython\Prompts.pyc in __call__(self, > arg) > 549 > 550 # and now call a possibly user-defined print mechanism > > --> 551 manipulated_val = self.display(arg) > 552 > 553 # user display hooks can change the variable to be stored > in > > > C:\Hacking\Python26\lib\site-packages\IPython\Prompts.pyc in _display(self, > arg) > 575 return IPython.generics.result_display(arg) > 576 except TryNext: > --> 577 return self.shell.hooks.result_display(arg) > 578 > 579 # Assign the default display method: > > > C:\Hacking\Python26\lib\site-packages\IPython\hooks.pyc in __call__(self, > *args, **kw) > 139 #print "prio",prio,"cmd",cmd #dbg > > 140 try: > --> 141 ret = cmd(*args, **kw) > 142 return ret > 143 except ipapi.TryNext, exc: > > C:\Hacking\Python26\lib\site-packages\sympy\interactive\__init__.pyc in > result_display(self, arg) > 29 print > 30 > ---> 31 print out > 32 else: > 33 print repr(arg) > > C:\Hacking\Python26\lib\encodings\cp437.pyc in encode(self, input, errors) > 10 > 11 def encode(self,input,errors='strict'): > ---> 12 return codecs.charmap_encode(input,errors,encoding_map) > 13 > 14 def decode(self,input,errors='strict'): > > UnicodeEncodeError: 'charmap' codec can't encode character u'\u03b2' in > position 0: character maps to <undefined> > > In [6]: print(u'\u03b1') > α > > In [7]: print(u'\u03b2') > ERROR: An unexpected error occurred while tokenizing input > The following traceback may be corrupted or invalid > The error message is: ('EOF in multi-line statement', (15, 0)) > > --------------------------------------------------------------------------- > UnicodeEncodeError Traceback (most recent call last) > > C:\Users\chesky\<ipython console> in <module>() > > C:\Hacking\Python26\lib\encodings\cp437.pyc in encode(self, input, errors) > 10 > 11 def encode(self,input,errors='strict'): > ---> 12 return codecs.charmap_encode(input,errors,encoding_map) > 13 > 14 def decode(self,input,errors='strict'): > > UnicodeEncodeError: 'charmap' codec can't encode character u'\u03b2' in > position 0: character maps to <undefined> > > In [8]: Now α is fine, but something there still is that doesn’t like a β… ;) Is this now a problem with …\Python26\lib\cp437.pyc, perhaps? —Joel Salomon
signature.asc
Description: PGP signature
signature.asc
Description: OpenPGP digital signature