Hi Milad,
You’re somehow mixing different vpython versions. There is a description of the evolution of vpython here:
<
http://vpython.org/contents/announcements/evolution.html>
----------------
The “visual” module that you’re importing is part of “classic” vpython with documentation here:
<
http://vpython.org/contents/doc.html>
and features described here:
<
http://vpython.org/contents/new_features.html>
The last version of classic vpython was vpython 6. Due to the way the screen is updated in vpython 6 you need a ‘rate()’ in an update loop to see the screen actually change/update as your program runs. So a minimal working program with a sphere might look like this:
sphere()
while True:
rate(30)
This should produce a window with a sphere that you can interact with using the mouse.
The vpython 6 installer also installs VIDLE so you can edit programs and run them easily.
----------------
The ‘vpython’ module is a new and pretty different direction for vpython. It shares most syntax/concepts with classic vpython but the implementation is completely changed. It uses WebGL to render 3D objects in a web browser. It uses the “jupyter” programming environment in a browser to control the 3D scene. You can’t program the new vpython module to create a stand-alone application separate from a web browser as you’re evidently attempting to do.
You can learn about jupyter here: <
http://jupyter.org/>
The documentation for this new module can be found here:
<
http://vpython.org/index.html>
After the paragraph regarding glowscript, find the header that says: "Experienced Python / VPython user? Try Jupyter VPython (this is a new version under rapid development, but already quite capable)”
I hope that helps!
-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/d/optout.