Tkinter doesn't work for MFC applications with Embedded Python?
deepak9999 at mail.com
Fri Jul 6 06:29:50 CEST 2001
I tried to go through all the related postings on the newsgroup
However, I haven't figured out a way to get Tkinter working in an MFC
application that uses embedded python interpreter... Here is the
that I am trying in the MFC application
The code in C is simple like this: -
void myFunc (int argc, char **argv)
PySys_SetArgv (argc, argv);
The code in Python script (myTkinterApp.py) is like this: -
print 'Tkinter successfully imported'
root = Tkinter.Tk ()
print 'Could not import Tkinter'
The result is that it prints: -
Tkinter successfully imported
The STDOUT is redirected to print to one of the MFC windows.
I tried to run this by changing the STDOUT to default (standard)
STDOUT. However, even that did not help.
Any examples or suggestions will be extremely valuable.
More information about the Python-list