includes a collection of Python modules and an extension module
(native code). It provides a series of Python classes that mirror (or
shadow) many of the wxWindows GUI classes. This extension module
includes a collection of Python modules and an extension module
(native code). It provides a series of Python classes that mirror (or
shadow) many of the wxWindows GUI classes. This extension module
-attempts to mirror the class heiarchy of wxWindows as closely as
-possble. This means that there is a wxFrame class in wxPython that
+attempts to mirror the class heirarchy of wxWindows as closely as
+possible. This means that there is a wxFrame class in wxPython that
So why would you want to use wxPython over just C++ and wxWindows?
Personally I prefer using Python for everything. I only use C++ when
I absolutely have to eek more performance out of an algorithm, and even
So why would you want to use wxPython over just C++ and wxWindows?
Personally I prefer using Python for everything. I only use C++ when
I absolutely have to eek more performance out of an algorithm, and even
The upside is that Tk is a pretty versatile toolkit. It can be made
to do a lot of things in a lot of different environments. It is fairly
The upside is that Tk is a pretty versatile toolkit. It can be made
to do a lot of things in a lot of different environments. It is fairly
string processing, it is fairly slow as well. (Not too bad on a fast
Pentium II, but you really notice the difference on slower machines.)
string processing, it is fairly slow as well. (Not too bad on a fast
Pentium II, but you really notice the difference on slower machines.)
Feel was possible on non-Motif platforms. This is because Tk
usually implements its own widgets (controls) even when there are
native controls available.
Feel was possible on non-Motif platforms. This is because Tk
usually implements its own widgets (controls) even when there are
native controls available.
for a listing of a few of them.
%----------------------------------------------------------------------
for a listing of a few of them.
%----------------------------------------------------------------------
to create the source code for the
extension module. This enabled me to only have to deal with a small
amount of code and only have to bother with the exceptional issues.
to create the source code for the
extension module. This enabled me to only have to deal with a small
amount of code and only have to bother with the exceptional issues.
me. You don't need SWIG to build the extension module as all the
generated C++ code is included under the src directory.
me. You don't need SWIG to build the extension module as all the
generated C++ code is included under the src directory.
finds on your system and information found in the build.cfg file.
If you have troubles building or you want it built or installed in
a different way, take a look at the docstring in build.py. You are
finds on your system and information found in the build.cfg file.
If you have troubles building or you want it built or installed in
a different way, take a look at the docstring in build.py. You are
build.local.
\item To build and install the add-on modules, change to the appropriate
directory under {\tt \$(WXWIN)/utils/wxPython/modules} and run the build
build.local.
\item To build and install the add-on modules, change to the appropriate
directory under {\tt \$(WXWIN)/utils/wxPython/modules} and run the build
the event table macros that wxWindows employs. But since static event
tables are impossible with wxPython, we use helpers that are named the
same to dynamically build the table. The only real difference is
the event table macros that wxWindows employs. But since static event
tables are impossible with wxPython, we use helpers that are named the
same to dynamically build the table. The only real difference is
the event table entry should be added to.
\item Notice the use of {\tt wxDLG\_PNT} and {\tt wxDLG\_SZE} in lines 19
- 29 to convert from dialog units to pixels. These helpers are unique
the event table entry should be added to.
\item Notice the use of {\tt wxDLG\_PNT} and {\tt wxDLG\_SZE} in lines 19
- 29 to convert from dialog units to pixels. These helpers are unique
{\em standard} events are attached to windows that have the associated
{\em standard} method names. I have tried to follow the lead of the
C++ classes in this area to determine what is {\em standard} but since
{\em standard} events are attached to windows that have the associated
{\em standard} method names. I have tried to follow the lead of the
C++ classes in this area to determine what is {\em standard} but since
be fully documented. When in doubt, use an EVT\_*** function.
\item At lines 17 to 21 notice that there are no saved references to
the panel or the static text items that are created. Those of you
who know Python might be wondering what happens when Python deletes
these objects when they go out of scope. Do they disappear from the GUI? They
don't. Remember that in wxPython the Python objects are just shadows of the
be fully documented. When in doubt, use an EVT\_*** function.
\item At lines 17 to 21 notice that there are no saved references to
the panel or the static text items that are created. Those of you
who know Python might be wondering what happens when Python deletes
these objects when they go out of scope. Do they disappear from the GUI? They
don't. Remember that in wxPython the Python objects are just shadows of the
attached to their parents, the parents manage them and delete them
when necessary. For this reason, most wxPython objects do not need to
have a \_\_del\_\_ method that explicitly causes the C++ object to be
attached to their parents, the parents manage them and delete them
when necessary. For this reason, most wxPython objects do not need to
have a \_\_del\_\_ method that explicitly causes the C++ object to be
\item \helpref{wxBusyCursor}{wxbusycursor}
\item \helpref{wxButton}{wxbutton}
\item \helpref{wxCalculateLayoutEvent}{wxcalculatelayoutevent}
\item \helpref{wxBusyCursor}{wxbusycursor}
\item \helpref{wxButton}{wxbutton}
\item \helpref{wxCalculateLayoutEvent}{wxcalculatelayoutevent}
\item \helpref{wxDataObject}{wxdataobject}
\item \helpref{wxDataObjectComposite}{wxdataobjectcomposite}
\item \helpref{wxDataObjectSimple}{wxdataobjectsimple}
\item \helpref{wxDataObject}{wxdataobject}
\item \helpref{wxDataObjectComposite}{wxdataobjectcomposite}
\item \helpref{wxDataObjectSimple}{wxdataobjectsimple}
\item \helpref{wxDC}{wxdc}
\item \helpref{wxDialog}{wxdialog}
\item \helpref{wxDirDialog}{wxdirdialog}
\item \helpref{wxDC}{wxdc}
\item \helpref{wxDialog}{wxdialog}
\item \helpref{wxDirDialog}{wxdirdialog}
\item \helpref{wxDropFilesEvent}{wxdropfilesevent}
\item \helpref{wxDropSource}{wxdropsource}
\item \helpref{wxDropTarget}{wxdroptarget}
\item \helpref{wxEraseEvent}{wxeraseevent}
\item \helpref{wxEvent}{wxevent}
\item \helpref{wxEvtHandler}{wxevthandler}
\item \helpref{wxDropFilesEvent}{wxdropfilesevent}
\item \helpref{wxDropSource}{wxdropsource}
\item \helpref{wxDropTarget}{wxdroptarget}
\item \helpref{wxEraseEvent}{wxeraseevent}
\item \helpref{wxEvent}{wxevent}
\item \helpref{wxEvtHandler}{wxevthandler}
\item \helpref{wxFileDataObject}{wxfiledataobject}
\item \helpref{wxFileDialog}{wxfiledialog}
\item \helpref{wxFileDropTarget}{wxfiledroptarget}
\item \helpref{wxFileDataObject}{wxfiledataobject}
\item \helpref{wxFileDialog}{wxfiledialog}
\item \helpref{wxFileDropTarget}{wxfiledroptarget}
\item \helpref{wxHtmlCell}{wxhtmlcell}
\item \helpref{wxHtmlContainerCell}{wxhtmlcontainercell}
\item \helpref{wxHtmlDCRenderer}{wxhtmldcrenderer}
\item \helpref{wxHtmlCell}{wxhtmlcell}
\item \helpref{wxHtmlContainerCell}{wxhtmlcontainercell}
\item \helpref{wxHtmlDCRenderer}{wxhtmldcrenderer}
\item \helpref{wxTextDropTarget}{wxtextdroptarget}
\item \helpref{wxTextEntryDialog}{wxtextentrydialog}
\item \helpref{wxTimer}{wxtimer}
\item \helpref{wxTextDropTarget}{wxtextdroptarget}
\item \helpref{wxTextEntryDialog}{wxtextentrydialog}
\item \helpref{wxTimer}{wxtimer}
\section{Where to go for help}\label{wxphelp}
Since wxPython is a blending of multiple technologies, help comes from
\section{Where to go for help}\label{wxphelp}
Since wxPython is a blending of multiple technologies, help comes from
various sources of help, but probably the best source is the
wxPython-users mail list. You can view the archive or subscribe by
going to
various sources of help, but probably the best source is the
wxPython-users mail list. You can view the archive or subscribe by
going to