If I understand correctly what you're trying to do, no, I don't think
it's possible. The only way to process events is with a while. However,
note that you can process keyboard events, not just mouse events, which
might give you part of what you want.
Bruce Sherwood
Michele Mattioni wrote:
> Dear list,
>
> Is there anyway to get the prompt back and still having the vpython
> window able to respond to the event?
> The window can zoom and rotate and return the prompt. I would like to
> achieve the same result, but handling other kind of mouse events.
>
> My goal is to launch the application and get back the ipython prompt
>
> Is that possible?
>
> Consider the following code:
>
> import visual as vs
>
> scene = vs.display(title="test")
> vs.sphere()
>
> while (True):
> if scene.mouse.clicked:
> m = scene.mouse.getclick()
> loc = m.pos
> print loc
> picked = m.pick
> if picked:
> picked.color = (0,0,1) #blue
>
> Is there any other way to process the events instead of using the while?
>
> Cheers,
> Michele
>
> ------------------------------------------------------------------------------
> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
> is a gathering of tech-side developers & brand creativity professionals. Meet
> the minds behind Google Creative Lab, Visual Complexity, Processing, &
> iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
> Group, R/GA, & Big Spaceship. http://www.creativitycat.com
> _______________________________________________
> Visualpython-users mailing list
> Vis...@li...
> https://lists.sourceforge.net/lists/listinfo/visualpython-users
>
|