[IPython-user] ipython + visual

Fernando Perez Fernando.Perez at colorado.edu
Thu Mar 2 18:06:52 CST 2006


Ryan Krauss wrote:
> I searched the vpython mailing list archives and they give a fix for a
> display closing bug, and I can keep ipython from shutting down using
> their fix, but then I can't start a second animation.  So, I am no
> better off with their fix and it definitely seems like a problem on
> the vpython end.  For now I have seperated the animation from the
> analysis that uses scipy, and not importing scipy in the animation
> makes it start up a couple of seconds faster from the regular python
> shell.  So, that is what I will do for now: ipython for analysis,
> regular python for the animation.

If I remember correctly, vpython uses OpenGL.  Unfortunately, I think some of 
the problem may be coming from the fact that the OpenGL engine is not easy to 
re-initialize.  I know very little about it, but I've tried to make an ipython 
version which can run OpenGL code by hooking directly into the necessary 
opengl calls (something like -wthread, but for opengl).  So far I've not been 
completely successful.

It may be possible for this to work, but I suspect it would require careful 
cooperation with the OpenGL engine.  For now, I also just write vpython 
scripts with

#!/usr/bin/env python

at the top and just run them standalone from the command line, starting a new 
python each time.  It's slower than I'd like, but without a proper 
understanding of the OpenGL issues involved, I'm pretty sure we won't have a 
real solution here.  Experts are welcome to comment.

Cheers,

f




More information about the IPython-user mailing list