|
Linux downloads for VPython 6
If you have an existing VPython, you will need to delete the old folders visual, vis, and vidle from site-packages or dist-packages. If you wish to use an earlier version of VPython, first check to see whether VPython is already available as a package for your Linux. For example, there is a "python-visual" package on Ubuntu. How to run VPython
Compatibility with the future and the pastWe encourage you to place the following statement at the start of your programs, in order that your program will run not only on Python 2.7 today, but also will run in the future on the newer Python 3.x series. Note the double underscore before "future" and the double underscore after "future". from __future__ import print_function, division For Python 2.7, this statement invokes the new Python 3.x print format, namely "print(x)" instead of the old "print x", and the new division scheme, namely that 3/4 is 0.75, not zero as in the past. This statement is ignored by Python 3.x. Changes from VPython 5: With VPython 6 you must include a rate statement in animation loops, and you must import visual or vis before importing graph or controls or filedialog. Conditions of useThe Polygon module distributed with VPython may not be used except with VPython. Here's why: In support of the text and extrusion objects, the Windows installer includes some modules that include Polygon, for which the following conditions apply: "Polygon is being distributed subject to the following conditions: This distribution contains code from the GPC Library, and/or code resulting from the use of the GPC Library. This usage has been authorized by The University of Manchester, on the understanding that the GPC-related features are used only in the context of this distribution. It is not permitted to extract the GPC code from the distribution as the basis for commercial exploitation, unless a GPC Commercial Use Licence is obtained from The University of Manchester, contact: http://www.cs.man.ac.uk/~toby/gpc/". What is installedThe VPython installer installs the vis, visual, and visual_common modules, the numpy, FontTools, Polygon, and ttfquery modules needed by VPython, and VIDLE, an improved version of the IDLE program editor, into /usr/local/lib/python2.7/dist-packages. Materials such as woodMaterials such as wood will work with graphics
cards that support Pixel Shader 3.0 ("PS 3.0"). See Older versionsImportant information concerning VPython 5 on Ubuntu, from John Zelle: "I think we have tracked down the problem with VPython seg faulting on 64 bit Ubuntu with NVIDIA drivers. It appears that some packages install a minor version upgrade of some glx libraries that cause the breakage. The following command restores a working VPython for us: Here is the latest source package for use with Python:
After installing VPython, start IDLE (you may have to
install it). Assuming your Python is /usr/bin/python, RECOMMENDED: An alternative version of IDLE that fixes some problems with the standard IDLE
|
|||||