vpython in spyder

20 views
Skip to first unread message

Jay Wang

unread,
Oct 20, 2017, 12:32:17 PM10/20/17
to comphys
Spyder is an integrated development environment like Jupyter. One can run vpython from the Spyder (see vpython.org). First, make sure you are using Spyder version 3.1.4. Then on the menu, click Run-->Configure, check "Execute in a new dedicated Python console." You should be all set. Test with the following code:
import vpython as vp
cube
= vp.box()
while True:
    vp
.rate(20)
    cube
.rotate(angle=0.1, axis=vp.vector(1,1,1))
You should see a spinning cube in an automatically opened browser tab.
Reply all
Reply to author
Forward
0 new messages