From: Bruce S. <Bru...@nc...> - 2009-07-03 04:49:43
|
What platform are you running on? I find that on Windows this does work properly running from a command line. The C++ code does intend to exit the program if we reach the end of the program and there are no windows visible. However, for some reason exit doesn't happen on Ubuntu Linux. I didn't yet try on the Mac. It also does not exit on Windows when running from VIDLE or IDLE, maybe because in the shell window you can still execute statements, such as scene.visible = True, so you're not really at the end of the program. Clearly we need some statement that unequivocally kills the program. Bruce Sherwood Michele Mattioni wrote: > Hello list, > > I'm trying to figure out how to close visual from the code and not > from the GUI, 'cause I need this feature. > > Consider the following code: > > > import visual > import time > scene = visual.display() > cyl = visual.cylinder() > time.sleep(3) > scene.visible = False > > > if you run it with > > python test.py > > the command line keeps to be busy and the prompt never show up. > This does not happen if I click on the x on top of the gui. > > I'm missing some bit? > > Regards, > Michele. > > ------------------------------------------------------------------------------ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |