From: Jonathan B. <jbr...@ea...> - 2003-07-16 15:59:47
|
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 On Wed, 2003-07-16 at 11:08, Patrick Bouffard wrote: > Hello, > > I've been playing with the visual module for a couple weeks now--first > off, let me just say, great work! It's great to have a way to cook up > simple 3D displays without worrying about the low-level details. I would > even recommend it to colleagues who are starting to learn Python (makes > for more interesting "hello, world" programs). > > My question (request, really) is, could someone post a simple example > program that uses both visual and wxPython? Searching the archives I > found some references to this being possible, but my own initial > attempts always seem to result in some kind of clashing of the main > loops of wxPython and visual; things like: > > GLib-WARNING **: g_main_iterate(): main loop already active in another > thread > > Now, I'm really just starting with wxPython so perhaps the answer is > really simple; if so just a pointer in the right direction would be fine... > > Thanks, > > --Pat |