From: Bruce S. <bas...@nc...> - 2010-09-14 18:55:56
|
At http://vpython.org/contents/history.html (the "Recent developments" section of vpython.org) you can download an experimental beta version of VPython for Python 3.1 for Windows. The font modules included in this VPython installer have been updated to work with Python 3.1, but tested only to the extent that they work with VPython. It is quite possible that additional work is needed to make them fully functional with Python 3.1. This beta version for Windows seems to work correctly, but it's labeled "beta" because this represents a pretty big change. If you're a bit adventurous I encourage you to use the new version and report any problems to this forum. I have not been able to produce a version for Python 3.1 for the Mac because there isn't yet a Mac installer for numpy, and I have been unsuccessful in trying to build numpy from source on the Mac. I also have not succeeded in building VPython on Ubuntu. The Python 2 series ended with Python 2.7. The Python 3 series cleans up some accumulated infelicities in the Python language, at the cost of some incompatibilities. The only significant incompatibility that affects nearly all Python 2 program is a change to the print statement: Python 2: print "momentum =", m*v Python 3: print("momentum =", m*v) The old form, without the newly required parentheses, gives an error in Python 3.x. The new form can be used with Python 2.x, but it displays the parentheses, which may look a bit odd. With Python 3.x, it is no longer necessary to use from __future__ import division in order to have 1/2 give 0.5 instead of 0. However, it doesn't matter if the statement is left in the program; it's simply ignored. Bruce Sherwood |