Mac Based Python GUI Libraries
I am currently building a GUI based Python application on my mac and was wondering could anyone suggest a good GUI开发者_StackOverflow中文版 library to use?
I was looking at python's gui programming faq and there was a lot of options making it hard to choose.
I am developing on snow leopard and cross-platform is not essential (if it makes a difference).
If you're not concerned about cross-platform compatibility, then PyObjC (also see Apple's info about PyObjC) provides a direct bridge to the native OS X Cocoa interfaces.
PyObjC (pronounced pie-obz-see) is the key piece which makes it possible to write Cocoa applications in Python. It enables Python objects to message Objective-C objects as if they're fellow Python objects, and likewise facilitates Objective-C objects to message Python objects as brethren.
Note that Apple tends to support and then not support these non-native interfaces to Cocoa; it's a good sign that there are recent releases of PyObjC.
wxPython and Qt (via PyQT or PySide) provide native OS X widgets and work across all major platforms.
There's a relatively new project active now called PyGUI which aims to provide a more modern cross-platform GUI for Python apps. On OS X, it uses PyObjC
to provide native GUI elements. It might be easier to get started using it rather than delving directly into PyObjC and Interface Builder.
精彩评论