O'Reilly logo

WxPython Application Development Cookbook by Cody Precord

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Optimizing for OS X

Even though wxPython is a native cross platform user interface library, it can still leave gaps on some platforms due to various reasons. Historically, the support in wxPython for Windows and Linux (GTK) has been fairly complete and consistent; however, for OS X, due to its different conventions, available features, as well as user expectations, it requires special attention when developing your application. In this recipe, we will look at some of the important small details to keep in mind when developing a wxPython application that may be deployed on OS X.

How to do it…

Perform the following steps:

  1. First, let's add some code to our app's OnInit method to enable wx.SystemOption, as follows:
    class OSXApp(wx.App): def OnInit(self): ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required