Tkinter doesn't work for MFC applications with Embedded Python?
Chris Barker
chrishbarker at home.net
Fri Jul 6 14:39:39 EDT 2001
Chris Tavares wrote:
> Tkinter and MFC don't mix in the same process. Neither will Tkinter and
> WxWindows, or MFC and WxWindows, or Tkinter and GTK+, or any other gui
> toolkits.
>
> The basic problem is that they all want control of the message loop - and
> the first one there gets it. This is also the reason you can't run Tkinter
> apps under PythonWin.
While you might want to try to hack your way around this limitation, you
will have a hard time of it, and you will, at best, get a result where
the GUI elements created by the C+++ code will look and feel different
that those created by the Python code.
Your best bet is to use the same toolkit for the C++ and Python
portions. This will result in a far more seamless transition between
them. I know it can be done with wxWindows and wxPython, I imagine it
could be done as well with QT or GTK. given that you are using MFC now,
wx is probably your best bet.
Check out the wxWindows/wxPython mailing list archives for info on how
to do it.
good luck!
-Chris
--
Christopher Barker,
Ph.D.
ChrisHBarker at home.net --- --- ---
http://members.home.net/barkerlohmann ---@@ -----@@ -----@@
------@@@ ------@@@ ------@@@
Oil Spill Modeling ------ @ ------ @ ------ @
Water Resources Engineering ------- --------- --------
Coastal and Fluvial Hydrodynamics --------------------------------------
------------------------------------------------------------------------
More information about the Python-list
mailing list