Where is print_pygame?

14 views
Skip to first unread message

Oyster

unread,
Sep 25, 2008, 10:02:04 PM9/25/08
to sympy
Hi, all
I am using sympy 0.6.2 on py24, and I have pygame module. But I met
this error. Does that mean pygame is not supported by sympy anymore?
If so, shall we remove examples\print_pygame.py out?

Thanx


Traceback (most recent call last):
File "H:\pure_pylib\math\sympy-0.6.2\examples\print_pygame.py", line
6, in ?
from sympy.printing import print_pygame, pprint
ImportError: cannot import name print_pygame

Mateusz Paprocki

unread,
Sep 26, 2008, 3:14:26 AM9/26/08
to sy...@googlegroups.com
Hi Oyster,

> I am using sympy 0.6.2 on py24, and I have pygame module. But I met
> this error. Does that mean pygame is not supported by sympy anymore?

We decided to remove support for pygame because the same functionality
can be achieved with pyglet, which we ship with sympy anyway (see
preview module). Unfortunately preview module works only on platforms
with provide pexpect module (see issues #872, #970).

> If so, shall we remove examples\print_pygame.py out?

It would be better to fix those examples and rename the file to
examples/preview.py

Looking forward to seeing patches fixing this,
Mateusz

2008/9/26 Oyster <lepto....@gmail.com>:

Oyster

unread,
Oct 11, 2008, 10:10:16 AM10/11/08
to sympy


Mateusz Paprocki 写道:
> Hi Oyster,
>
> > I am using sympy 0.6.2 on py24, and I have pygame module. But I met
> > this error. Does that mean pygame is not supported by sympy anymore?
>
> We decided to remove support for pygame because the same functionality
> can be achieved with pyglet, which we ship with sympy anyway (see
> preview module). Unfortunately preview module works only on platforms
> with provide pexpect module (see issues #872, #970).
so bad, I use windows which does not support pexpect :(

Ondrej Certik

unread,
Oct 11, 2008, 11:53:54 AM10/11/08
to sy...@googlegroups.com
2008/10/11 Oyster <lepto....@gmail.com>:

>
>
>
> Mateusz Paprocki 写道:
>> Hi Oyster,
>>
>> > I am using sympy 0.6.2 on py24, and I have pygame module. But I met
>> > this error. Does that mean pygame is not supported by sympy anymore?
>>
>> We decided to remove support for pygame because the same functionality
>> can be achieved with pyglet, which we ship with sympy anyway (see
>> preview module). Unfortunately preview module works only on platforms
>> with provide pexpect module (see issues #872, #970).
> so bad, I use windows which does not support pexpect :(

I see. We could achieve the same thing using "os.system", which should
work on windows too. Do you have tex installed? How do you invoke it?
E.g. would

os.system("tex somefile.tex")

work? If so, it'd be easy to fix it. If not, we'd need help from
someone using windows (you? :) to get this resolved.

Ondrej

Oyster

unread,
Oct 14, 2008, 4:51:10 AM10/14/08
to sympy


Ondrej Certik 写道:
os.system("tex somefile.tex") should work
But I do not use tex.

matplotlib supports some nice mathematical expressions without
tex(http://matplotlib.sourceforge.net/tutorial.html, search 'Writing
mathematical expressions'). I donno whether it is useful for sympy

I can help sympy if you need someone who uses windows
Reply all
Reply to author
Forward
0 new messages