Python, MFC and the good old Hello World

Alex Martelli aleaxit at
Thu Feb 22 10:05:02 CET 2001

"Timo Becker" <Timo.Becker at> wrote in message
news:971jbf$mptke$1 at
> Thanks for your help, Mark.
> > I'm afraid I don't have the time to do and test this - but check out
> "pywin\framework\" - that is
> > where you can find Pythonwin's main frame and app code.
> Radim Polásek just told me that PythonWin comes with a in the
> demos/app directory (I must have been blind :-)) which is almost a one to
> one translation of the code I posted.

Emphasis on the "almost" -- e.g., it does NOT use a frame as
its "frame", which your code did (and so did my translation
thereof) -- it uses a generic window; it ignores the show
parameter with which the program is invoked, forcing instead
the use of SW_SHOWNORMAL (the OS compensates for this specific
application bug in some versions, e.g. on NT4 SP4, but not on
all versions), which your code and my translation thereof did
not; etc.

> > Note that if you dont have significant MFC experience or existing code
> must interface with, wxPython
> > would be a better choice.
> I just started using MFC under C++ and only wanted to find out how much i
> can transfer of that new knowledge to Python. Most time I use Python
> as COM Servers and don't mind about a gui at all.

Unless you *already* have substantial legacy MFC code or knowledge,
I second the suggestion -- go for wxPython instead (or, Tkinter,
or, Dynamic HTML, ...).  The MFC architecture, besides not being
portable, is "legacy" even from Microsoft's viewpoint.


More information about the Python-list mailing list