Another approach (that I've not tried) is possibly to set up the VPython
program as a server and control it from another process running wxPython.
I've written a server that uses VPython and also a VBA (from Excel) routine
that controls the VPython display. As they are running in separate
processes, they don't interfere with each other. (I also made the server
routine multi-threaded to allow it to continue updating the display while
responding to calls from VB). I've been thinking of moving the UI from
Excel VBA (which is a great rapid prototype platform) to wxPython -- I'd be
interested to hear if anyone knows of problems with (or has tried) the
multi-process approach.
Bruce Peterson
At 08:32 PM 7/16/2003, you wrote:
>Message: 2
>Subject: Re: [Visualpython-users] working visualpython + wxPython program?
>From: Jonathan Brandmeyer <jbr...@ea...>
>Reply-To: jbr...@us...
>To: Patrick Bouffard <pat...@sp...>
>Cc: "Vis...@li..."
><Vis...@li...>
>Date: 16 Jul 2003 11:44:31 -0400
>
>The short answer is "That's not possible," at least not with any
>assurance of safety. The long answer is that visual uses its own event
>loop to asynchronously cache and process things like keyboard presses
>and mouse clicks & drags. Changing this behavior to say, embed a
>vpython window within some larger python GUI program (using pyGTK or
>wxPython or tkinter for examples) will require a mechanism to provide a
>widget to visual that gives visual the necessary functionality.
>
>That ability to write a new toolkit-specific widget in python and pass
>it to visual is not possible right now. However, it is top on my list
>of things to do with the new Boost-based interface that is cooking in
>CVS.
>
>-Jonathan Brandmeyer
|