sympy error in PythonWin Editor

Posted by terna on 2008-03-27 14:56

I've installed in my XP machine Sympy (Symbolic math in Python, very nice), from http://code.google.com/p/sympy/

It works perfectly into the Active Python / Python Interactive Shell

e.g.,
>>> from sympy import *
>>> oo > 99999999999
True
>>>

Using PythonWin Editor of Active Python I get the following error:

>>> from sympy import *
Traceback (most recent call last):
File "", line 1, in
File "C:\Python25\Lib\site-packages\sympy\__init__.py", line 36, in
from printing import pretty, pretty_print, pprint, pprint_use_unicode, \
File "C:\Python25\Lib\site-packages\sympy\printing\__init__.py", line 3, in
from pretty import *
File "C:\Python25\Lib\site-packages\sympy\printing\pretty\__init__.py", line 6, in
pprint_try_use_unicode()
File "C:\Python25\Lib\site-packages\sympy\printing\pretty\pretty_symbology.py", line 99, in pretty_try_use_unicode
encoding = sys.stdout.encoding
File "C:\Python25\Lib\site-packages\pythonwin\pywin\mfc\object.py", line 18, in __getattr__
return getattr(o, attr)
AttributeError: encoding
>>>

Many thanks for any suggestion, the best, Pietro Terna