chrisdembia / yeadon

The human inertia model developed by Fred Yeadon in 1990.
https://pypi.python.org/pypi/yeadon
Other
29 stars 9 forks source link

ipython closes after the draw command is issued to the human object #6

Closed moorepants closed 11 years ago

moorepants commented 13 years ago

I'm using yeadon with the bicycle parameters and when I tell the human to draw via visual python and then close the vpython window, the command line returns to bash and shuts down ipython. I have this in my yeadonwork branch if you want to try.

import bicycleparameters.bicycleparameters as bp
rigid = bp.Bicycle('Rigidfakeyeadon', forceRawCalc=True)
rigid.add_rider('Jason', 'data', draw=True)

then close the vpython window. this may be something wrong with vpython and its compatibility with ipython

chrisdembia commented 13 years ago

This is not an ipython issue; it also occurs if using python (vs ipython). I looked at the VPython documentation at http://vpython.org/webdoc/visual/display.html

and found that I can add the line "vis.scene.exit = False" in human.draw_visual(). A quote from the VPython doc:

"If sceneb.exit = False, the program does not quit when the close box of the sceneb display is clicked. The default is sceneb.exit = 1, in which case clicking the close box does make the program quit."

I did this and found that it just means clicking "X" will close the rendering window, but VPython will still continue to run, and the VPython window remains open (just the render goes away). A second click on "X" closes VPython as well as the python command prompt. So I do not think this does what is desired.

So as of yet, this issue is not resolved.

In Matplotlib's axes3d window, this is not an issue; closing the plot allows continued use of the program.