InterviewSolution
| 1. |
I've Looked At Tkinter And At Wxpython. Why Would I Choose One Or The Other? |
|
Answer» Installation: tkInter is a GUI toolkit that has been distributed widely with Python, and is readily available to everyone who is running Python. wxPython requires an additional install on top of the Python install. If it's just for your own machine, this isn't a big deal, but if you have a lot of people who need it, this could become a bit of a big deal. Native Look and Feel: wxPython supports the native look and feel of the platform being used. tkInter has its own look and feel for some components, which doesn't match any standard platform. Windows XP and Python 2.2.2: In Python 2.2.2 under Windows XP you need this additional step: Put two files python.exe.manifest and pythonw.exe.manifest, both with the following contents: in your Python installation directory (where respective .exe files reside). NEXT time you run your wxPython applications, they'll look like "normal" XP applications. This may also affect other Python modules that use Windows display API. If you are using py2exe to build a STANDALONE Python executable, say FOO.EXE, you need to copy pythonw.exe.manifest into the directory where FOO.EXE is and name it FOO.EXE.manifest. Wide Range of Available Widgets: wxPython has a much wider range of available widgets than does tkInter. There are additions available for tkInter that somewhat mitigate this situation, but this destroys the convenience argument for tkInter. In addition, the wxPython toolkit has SUPPORT for printing and other non-GUI, but also non-standard operations. tkInter is fine if your application is simply a way of interacting with the user via a GUI, but if you need to develop a full-scale application with support for drawing your own UI elements, support for printing, etc., wxPython is definitely the way to go. Installation: tkInter is a GUI toolkit that has been distributed widely with Python, and is readily available to everyone who is running Python. wxPython requires an additional install on top of the Python install. If it's just for your own machine, this isn't a big deal, but if you have a lot of people who need it, this could become a bit of a big deal. Native Look and Feel: wxPython supports the native look and feel of the platform being used. tkInter has its own look and feel for some components, which doesn't match any standard platform. Windows XP and Python 2.2.2: In Python 2.2.2 under Windows XP you need this additional step: Put two files python.exe.manifest and pythonw.exe.manifest, both with the following contents: in your Python installation directory (where respective .exe files reside). Next time you run your wxPython applications, they'll look like "normal" XP applications. This may also affect other Python modules that use Windows display API. If you are using py2exe to build a standalone Python executable, say FOO.EXE, you need to copy pythonw.exe.manifest into the directory where FOO.EXE is and name it FOO.EXE.manifest. Wide Range of Available Widgets: wxPython has a much wider range of available widgets than does tkInter. There are additions available for tkInter that somewhat mitigate this situation, but this destroys the convenience argument for tkInter. In addition, the wxPython toolkit has support for printing and other non-GUI, but also non-standard operations. tkInter is fine if your application is simply a way of interacting with the user via a GUI, but if you need to develop a full-scale application with support for drawing your own UI elements, support for printing, etc., wxPython is definitely the way to go. |
|