From: Stef M. <s.m...@ru...> - 2008-10-31 14:58:26
|
hi Jasper, looks great !! Jasper Stolte wrote: > Hi all, > > After very little effort I got them working together a few weeks ago > in my pendulum simulator, which can be downloaded from google code.. I > wanted to post the result to the wx-python list when it is a bit more > mature, as it's not quite finished yet. Yes do so, I think it's very valuable for wxPython users !! > Anyway, run src/main.py, screenshot attached. It's got a wxPython part > which shows a slider with which you can influence the pendulum length. > Under Linux, this is a real-time simulation, but under Windows I guess > smth is messed up with the wx.Timer so it is very slow. At this moment I only looked at the picture, I'll try it this evening under windows to see how fast / slow it is. > > >> svn checkout */http > <http://pendulum-cart.googlecode.com/svn/trunk/>/*://pendulum-cart.googlecode.com/svn/trunk/ > > Anyway, the solution really was as simple as mentioned here. You can > just import visual and create a scene. This scene will then be > displayed in a separate window. As long as you keep track of the > visual object in the wxPython framework, you can manipulate it any way > you like from the wxPython program. > > Even nicer would be if somehow the OpenGL canvas would be available in > Python visual object, so you could really draw it to a wxPython > window. Now there's that extra GTK frame hanging around with the 3D > rendering. Not that this is a big issue or anything. Just something to > put on the wishlist for when the important things are already working.. ;) > yes that's the final step. I don't know if it's possible to dock arbitrary application in a wxPython window ? thanks, Stef Mientki > Greetz, > Jasper > > > > On Fri, Oct 31, 2008 at 1:36 AM, Stef Mientki <s.m...@ru... > <mailto:s.m...@ru...>> wrote: > > Jose, Bruce, > > thanks for your answers.... > > Jose Antonio Martin H wrote: > > Hi , > > > >> This doesn't seem to be possible at first sight, because both > >> environments claim the main loop > >> > > > > Vpython does not claim a main loop. > > > > You can simply create the scene, the objects, etc... > > > > And have your Wxpython program running, vpython will continue > executing and > > you can change the objects of vpython from whithin your App > directly. > > > That sounds really simple. > I've to admit, that I never investigated the possibilities, > because on the wxPython list, this is the usual answer: > > "Both wxpython and vpython are great tools, which I'd love to use > together for my program. The problem is they each run their own event > loop. Now almighty Google taught me there were some ancient threads on > the topic stating it would be very hard to combine the two." > > If I've some more time I'll certainly will try it. > > btw, does anyone has a (working) example of wxPython + VPython ? > > thanks again, > Stef Mientki > > > Also, you can indeed control the speed at wich the vpython do > what it to > > with the rate() comand, or just ignore it for full speed. > > > > Thats all. > > > > Hope this help. > > JAMH. > > ----- Original Message ----- > > From: "Bruce Peterson" <bap...@te... > <mailto:bap...@te...>> > > To: <vis...@li... > <mailto:vis...@li...>> > > Sent: Friday, October 31, 2008 12:30 AM > > Subject: [Visualpython-users] Vpython and wxPython > > > > > > > >> Hi Stef > >> I did this some years ago, but as I recall, the key to using > >> Vpython from Wx python is to create a client-server architecture. > >> Create your Vpython application as a com object with variable > >> parameters expressed as public methods. The server is launched from > >> your Wxpython application. The Wxpython app provides the UI and > >> allows updating the Vpython parameters with each pass through > the control > >> loop. > >> > >> Bruce > >> > >> At 03:10 PM 10/30/2008, you wrote: > >> > >>> From: Stef Mientki <s.m...@ru... <mailto:s.m...@ru...>> > >>> Precedence: list > >>> MIME-Version: 1.0 > >>> To: vis...@li... > <mailto:vis...@li...> > >>> Date: Thu, 30 Oct 2008 00:18:31 +0100 > >>> Message-ID: <490...@ru... > <mailto:490...@ru...>> > >>> Content-Type: text/plain; charset=ISO-8859-1; format=flowed > >>> Subject: [Visualpython-users] WPython + wxPython possible ? > >>> Message: 5 > >>> > >>> hello, > >>> > >>> now there's some activity on the list, > >>> I (and many other wxPython users) would love to use VPython from a > >>> wxPython application. > >>> > >>> This doesn't seem to be possible at first sight, because both > >>> environments claim the main loop > >>> (but I'm not an expert). > >>> > >>> There's an example on youtube: > >>> http://www.youtube.com/watch?v=nMNzMwDXHLA > >>> > >>> but this could well be 2 separate applications, > >>> communicating in some clever way. > >>> But that's also an acceptable solution. > >>> > >>> Any suggestions / answers / links ? > >>> > >>> thanks, > >>> Stef Mientki > >>> > >> > ------------------------------------------------------------------------- > >> This SF.Net email is sponsored by the Moblin Your Move Developer's > >> challenge > >> Build the coolest Linux based applications with Moblin SDK & > win great > >> prizes > >> Grand prize is a trip for two to an Open Source event anywhere > in the > >> world > >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ > <http://moblin-contest.org/redirect.php?banner_id=100&url=/> > >> _______________________________________________ > >> Visualpython-users mailing list > >> Vis...@li... > <mailto:Vis...@li...> > >> https://lists.sourceforge.net/lists/listinfo/visualpython-users > >> > >> > > > > > > > ------------------------------------------------------------------------- > > This SF.Net email is sponsored by the Moblin Your Move > Developer's challenge > > Build the coolest Linux based applications with Moblin SDK & win > great prizes > > Grand prize is a trip for two to an Open Source event anywhere > in the world > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > <http://moblin-contest.org/redirect.php?banner_id=100&url=/> > > _______________________________________________ > > Visualpython-users mailing list > > Vis...@li... > <mailto:Vis...@li...> > > https://lists.sourceforge.net/lists/listinfo/visualpython-users > > > > > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win > great prizes > Grand prize is a trip for two to an Open Source event anywhere in > the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > <http://moblin-contest.org/redirect.php?banner_id=100&url=/> > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > <mailto:Vis...@li...> > https://lists.sourceforge.net/lists/listinfo/visualpython-users > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > ------------------------------------------------------------------------ > > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. |