If you install Tcl/Tk in the default locations, simply rerunning "make" should build the _tkinter extension. You may have to install Tcl and Tk (when using RPM, install the -devel RPMs as well) and/or edit the setup.py script to point to the right locations where Tcl/Tk is installed. Do **not** edit Modules/Setup (it is out of date). If it fails with "No module named _tkinter", your Python configuration needs to be modified to include this module (which is an extension module implemented in C).> import _tkinter # with underscore, and lowercase 't' Try the following command at the Python prompt: MythDebunking: TkInter is ugly on Windows ( )Ī good way to systematically check whether your Tkinter support is working is the following.Įnter an interactive Python interpreter in a shell on an X console. How Tkinter can exploit Tcl/Tk extensions Simple toolsuite to create Tkinter GUIs on the fly from JSON files Lib/lib-tk/Tkinter.py in any Python distribution. This contains many helpful examples, including updated versions of Matt Conway's examples.The source: when all else fails: Read The Source, Luke!ĭemo/tkinter/ in the Python source distribution.HTML version, converted by Ken Manheimer. It's the only document that explains how to read the Tcl/Tk manuals and translate the information there to Tkinter calls. The Tkinter Life Preserver, by Matt Conway is still useful, though way out of date. The New Mexico Institute of Mining and Technology created its own Tkinter manual. Tips for Python/Tk by Andreas Balogh (about useful documentation, GUI builders and tips using Grid and HList widgets). Online Tcl/Tk Manual Pages - the official man pages at the Tcl Developer Xchange. Graphical User Interfaces with Tk, a chapter from the Python Documentation. TkDocs Tutorial, official Tkinter documentation that covers Python 3+ and Tk8.5, with easy to follow examples. Thinking in Tkinter is an introduction to some basic Tkinter programming concepts. (ttk is an extension and submodule included within Tkinter) Tkinter ttk Extension Tutorial covers the new widgets and features brought by the ttk module into Tkinter. Python GUI with Tkinter is a complete tutorial that covers all the widgets for the Tkinter library, complete with examples. This book just recently came back into print on demand, see the publisher's website. Python and Tkinter Programming by John Grayson (see also GuiBooks). CameronLaird calls the yearly decision to keep TkInter "one of the minor traditions of the Python world." It is however the most commonly used one. Tkinter is not the only GuiProgramming toolkit for Python. It is a thin object-oriented layer on top of Tcl/Tk. Tkinter is Python's de-facto standard GUI (Graphical User Interface) package.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |