Vpython hangs on Mac (enthought python distro)

157 views
Skip to first unread message

Andrew Morrison

unread,
Jul 3, 2013, 12:39:04 PM7/3/13
to vpytho...@googlegroups.com

I have the enthought distribution of python on my Macbook.  I installed the vpython package linked from the download page and all the associated packages in the dmg file. 

When I try to test vpython out, I don't get any errors, but the only thing that happens is a Vpython window opens up and the cursor changes to the spinning wheel.

Example:

M-AMORRISO-2ML:~ amorriso$ python
Enthought Python Distribution (EPD) free version -- www.enthought.com
Version: 7.3-2 (32-bit)
(type 'upgrade' or see www.enthought.com/epd/upgrade to get the full EPD)

Python 2.7.3 |EPD_free 7.3-2 (32-bit)| (default, Apr 12 2012, 11:28:34)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "credits", "demo" or "enthought" for more information.
>>> from visual import *
>>> sphere()
<visual_common.primitives.sphere object at 0x6f09120>
>>>


Any suggestions?

Thanks!

Steve Spicklemire

unread,
Jul 3, 2013, 1:25:31 PM7/3/13
to vpytho...@googlegroups.com, vpytho...@googlegroups.com
You'll need a loop they calls the "rate" function.

thanks,
-steve
--
You received this message because you are subscribed to the Google Groups "VPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vpython-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Steve Spicklemire

unread,
Jul 3, 2013, 1:36:07 PM7/3/13
to vpytho...@googlegroups.com, vpytho...@googlegroups.com
Uh... "Loop that calls" sorry... On the road with just my phone.

thanks,
-steve

On Jul 3, 2013, at 12:25 PM, Steve Spicklemire <stevespi...@gmail.com> wrote:

> loop they calls

Andrew Morrison

unread,
Jul 3, 2013, 1:43:25 PM7/3/13
to vpytho...@googlegroups.com
Ahhh.....thank you!!

So, just for my curiosity, is there a recommended way to use visual in an interactive way?  I can write my own python code and run it, but I was hoping to test visual simulations from the python shell (maybe in ipython).   When I use the rate function in a loop if I kill the vpython window the python shell resets, and I have to start all over again.

Steve Spicklemire

unread,
Jul 3, 2013, 1:56:22 PM7/3/13
to vpytho...@googlegroups.com, vpytho...@googlegroups.com
I cooked up a crude shell at some point that ran rate() on a timer callback. I'll try to track it down when I get back home. If you're motivated/interested you're welcome to dress it up into something useful.

thanks,
-steve
--

Steve Spicklemire

unread,
Jul 3, 2013, 2:16:34 PM7/3/13
to vpytho...@googlegroups.com, vpytho...@googlegroups.com
Actually I found it on Dropbox. Let me know if it works for you. I don't know enough about the innards of ipython to know if it's easy or hard to get something like this working there. 

thanks,
-steve

Bruce Sherwood

unread,
Jul 3, 2013, 2:17:13 PM7/3/13
to vpytho...@googlegroups.com
In a shell you can type "wait()" to update the graphics window. It drives the interact machinery once, which includes rendering the current scene. However, you can't spin or zoom the camera, since that requires repeated calls to the interact machinery.

Steve Spicklemire

unread,
Jul 3, 2013, 2:17:12 PM7/3/13
to vpytho...@googlegroups.com, vpytho...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages