Re: More wxPython progress
Bruce Sherwood <[email protected]> Sun, 11 Nov 2012 17:01:20 -0700
| Newsgroups | gmane.comp.python.visualpython.user |
|---|---|
| Message-ID | <CAFDG03ggeXPtuaaRMz4ksAA4bFww-5K9t--_8D93om7biOW6AQ@mail.gmail.com> |
I should also point out two minor changes in VPython syntax: 1) You must have a rate statement in a loop. Otherwise no display will be made until you exit the loop. If the loop is eternal, you will never see a display. 2) In current VPython, if you say "from visual.graph import *" you also get everything you would get from "from visual import *". Now you have to say both things to get a display: from visual import * from visual.graph import * As before, you can be more selective and not import math, numpy, etc.: import vis import vis.graph Bruce Sherwood On Sun, Nov 11, 2012 at 4:52 PM, Bruce Sherwood <[email protected]> wrote: > I've created a new GitHub repository for the wxPython version of VPython: > > github.com/BruceSherwood/vpython-wx > > Should you wish to play with this, note that at the moment I think it > will only work on Windows, for which I handle GetProcAddress (in the > file site-packages/visual_common/create_display.py). > > You need to install wxPython, and at this moment there isn't yet a > version of wxPython for Python 3.x, though it seems to be not far off. > > In the folders visual and vis are __init__.py files that invoke > create_display.py, which does the Jiu-Jitsu trick of importing the > user's file that imported visual or vis.. > > Bruce Sherwood > > On Sat, Nov 10, 2012 at 4:18 PM, Bruce Sherwood <[email protected]> wrote: >> Today for the first time I was able to run all of the standard VPython >> programs with a version of VPython based on wxPython. There's still >> some polishing to be done before a release, but I'm delighted to have >> gotten this far. >> >> Remember that one thing this will lead to is a version that uses Cocoa >> on the Mac and can therefore permit running on a 64-bit Python. >> Another thing it should make possible is being able to put a 3D >> graphics canvas in a window that also has native buttons, sliders, >> etc., and with native pull-down menus. >> >> Bruce Sherwood ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_nov