Tkinter doesn't work for MFC applications with Embedded Python?

Chris Tavares ctavares at develop.com
Fri Jul 6 07:54:56 CEST 2001


"Deepak" <deepak9999 at mail.com> wrote in message
news:48365474.0107052029.12d28427 at posting.google.com...
> Hi,
> I tried to go through all the related postings on the newsgroup
> regarding this.
> However, I haven't figured out a way to get Tkinter working in an MFC
> application that uses embedded python interpreter... Here is the
> simple code

[... snip ...]

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.

It may be possible to get this to work, but not without hacking on Tk's C
source code.

-Chris






More information about the Python-list mailing list