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 a开发者_如何学运维nd 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 ?
Don't waste your time. Use wxPython, which will use the native toolkit for you.
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.
Check out Venster. It is a ctypes
-based wrapper over Win32 API.
Though I must confess that I never used it, just looked over, and used its WinCE port (VensterCE) a little bit.
精彩评论