From: Bruce S. <Bru...@nc...> - 2012-11-10 23:19:00
|
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 |
From: K.-Michael A. <kmi...@gm...> - 2012-11-11 04:33:25
|
Dear Bruce, Let me sincerely congratulate on that progress. Us Mac users understand that this is an important step to ensure the survival of vpython in the future, so I'm very very happy to see some light at the end of the tunnel for this problem. Now that the future seems safer, one might think about bigger projects with a bit more investment of time. I personally was always dreaming of a space mission planning tool to visualize instrument coverage on planetary objects. There are tools out there but written in Java, so, no further comment ;) Thanks a lot for your effort and have a nice Sunday! Michael PS: sorry that I made no progress in compiling vpython for Enthought but I reached difficulties that were higher than my knowledge of compilations so I gave up for now. Maybe I could try again with the wx version some time? I don't know if it makes a difference though? On Nov 10, 2012, at 15:18, Bruce Sherwood <Bru...@nc...> 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 > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: Bruce S. <Bru...@nc...> - 2012-11-11 23:52:12
|
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 <Bru...@nc...> 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 |
From: Bruce S. <Bru...@nc...> - 2012-11-12 00:01:28
|
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 <Bru...@nc...> 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 <Bru...@nc...> 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 |
From: Guilherme B. T. <gui...@gm...> - 2012-11-13 10:44:05
|
Dear Bruce, Congratulations for the progress with wxPython. I'm trying to get it to run on OS X 10.6.8. For that I'm hacking around with the build system. In short, I removed X11, GTK and added mac_font_rendering to the build. The compilation runs till it chokes on the font_renderer. With wxPython, if understand correctly, besides solving the main thread issue one can also remove the X11 and GTK dependencies. Isn't it so that by dropping GTK (and the rendering via pango) we need to switch back to the mac_font_rendering? The header for and the function ATSUFindFontFromName is nowhere to be found on my system. Isn't it only for the deprecated Carbon? I guess the font_renderer need a bump from ATSUI to CoreText in order to work with the Cocoa text system. Is the above the right way to go? So far I found some snippets that might help with the transition to CoreText [1] Regards, Guilherme Torri [1] https://github.com/jjgod/xetex/commit/26b80b6a946164f4b5b2a565702bc6789a568229 On 12/11/12 01:01, Bruce Sherwood wrote: > 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 <Bru...@nc...> 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 <Bru...@nc...> 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 > |
From: Bruce S. <Bru...@nc...> - 2012-11-14 07:18:28
|
At github.com/BruceSherwood/vpython-wx there is now code that works on the Mac, but still with no textures (need to invoke GetProcAddress, which is platform-specific), and spin/zoom which works on Windows is buggy on the Mac. I haven't tried Linux yet. This includes improved documentation for building the C++ code for Windows and Mac. Bruce Sherwood |
From: Bruce S. <Bru...@nc...> - 2012-11-15 06:20:55
|
More progress, uploaded to github.com/BruceSherwood/vpython-wx. Textures are now supported on both Mac and Windows. I haven't worked on Linux yet. Known bugs: Mouse interactions aren't quite right on the Mac, using a 3-button mouse, and I haven't yet tackled the one-button mouse. No keyboard event handling yet (which is related to handling a one-button mouse). Minor bugs, such as not being able to make a window invisible. Aspirations not yet addressed: Placing a 3D VPython canvas in a window larger than the canvas, and making it possible to add wxPython elements such as buttons to the window. Exploiting GPUs on graphics cards (which means importing such developments from the GlowScript project). Bruce Sherwood |
From: Bruce S. <Bru...@nc...> - 2012-11-15 20:23:20
|
Uploaded to GitHub: Keyboard inputs are now handled, in the same way as in VPython 5.x. Given various past requests, I'd like to augment keyboard events to make it possible to detect down and up events, and whether control keys are also down (such as shift and ctrl). But first I want to get the new VPython in shape so it can be used as an alternative to the existing version, and I said earlier, there are some minor bugs that remain. I thank Steve Spicklemire for expressing the willingness to see whether he could take on the task of producing installers of the new VPython for the Mac. Bruce Sherwood |
From: Bruce S. <Bru...@nc...> - 2012-11-15 20:36:07
|
For keyboard input, I translate keycode numbers from a US keyboard into strings, so that pressing the Enter key returns the string "enter". If there is someone in the VPython community knowledgeable about non-US keyboards and would like to contribute alternative translation tables, I'd be delighted to make them accessible in the new VPython. Take a look at the GitHub file site-packages/visual_common/create_display.py which contains the US keyboard translation table. Probably the keyboard table should be imported from a file "keyboard-us.py", and similarly for other tables. We could add to the site-settings.py file options to specify what keyboard layout to use by default, and now that we'll have pull-down menus we can give the end user a choice (or maybe there's a way to detect the keyboard?). One of the goals of vpython-wx is to make it a lot easier for people to contribute to its further development. The old VPython depended on a lot of multithreaded C++ code, but the new version has eliminated the threading, which makes many things a whole lot simpler (and you don't have to worry about a lot of now nonexistent potential threading problems), and the new version has much of the key user interface stuff written in Python. Bruce Sherwood |
From: Bruce S. <Bru...@nc...> - 2012-11-16 00:29:13
|
I should mention that after trying various tools for managing GItHub repositories, I can recommend SmartGit, available on all platforms (Windows, Mac, Linux). Bruce Sherwood |