When to choose wxPython Python class or wxWidgets wrapped class?

There are some classes in wxPython implemented in Python with equivalents in wxWidgets for which Python wrappers are provided.

Should I prefer the Python or wrapped ones? Or is it a matter of deciding case by case? I wish the documentation would provide some guidance, e.g., by referring from the least recommended to the most recommended.

For example, for an application using dock windows should I use wx.aui or wx.lib.agw.aui? The excellent demo app shows both, so it isn’t clear which I should prefer.

Short answer: It depends. :smiley:

In the case of AUI we had the C++ wrappers, but the code was getting stale (unmaintained) for a while, so Andrea ported and improved the code and the result was wx.lib.agw.aui. In the meantime the C++ AUI code has gotten some attention and is in better shape than it was before. So although they are real close in API and functionality, there has been some divergence, so it is best to try them both and use the one you like best.

In most other cases of apparent overlap the usual case is that the Python version started with porting some generic C++ classes to Python, and then extended with new functionality. So if you want to use that new functionality then you should use the Python version. If not, then sticking with the wrapped C++ versions is usually best.