Search code examples
pythonwindowsqtmacoswxwidgets

Python and native GUI


I checked some other question and websites, and I've come to the conclusion that Python does allow (correct me if I'm wrong) you to make GUI programs using different cross-platform toolkits like Qt, wxWidgets and some others. But what if I don't want cross-platform portability. Primary, I want to develop native application using native libraries like Cocoa for Mac, native libraries of Windows for window, GTK for GNOME and Qt for KDE apps different with different code. Different code is not an issue here. Can I do this? I just don't need cross-platform portability but I need to make native apps?

Any insights from pro programmers ?


Solution

  • On Windows, the PyWin32 project has bindings to the Win32 API (and to MFC, if you already know that.)

    On OS X, you can use PyObjC to write Cocoa programs -- see their examples

    Edit: Note that in general, I agree with @Ignacio's advice here. In most cases, it's hard to justify the added expense & hassle of maintaining separate per-platform code bases. OTOH, I've had clients reject the use of wx on Mac projects because they say it doesn't generate apps that look like real Mac apps.