Requirements#
In order to use the scripts developed here, a modern version of Python with a tkinter version needs to have themed widgets (ttk). If tkinter is 8.6 or greater png files can be used directly. Open a python session and import ttk to confirm all will run.
Warning
Python2 is no longer supported, so unless there are backward compatability issues work with Python3.
Python3 |
Python2 |
|---|---|
|
|
- Windows Directory
When working in Windows I found it useful to use directories within the user working directory
C:\Users\edgar\programs\python312for the Python 3.12 installation,C:\Users\edgar\pythonfor general python scripts andC:\Users\edgar\sphinxfor sphinx specific scripts, this avoids editing issues if the programs were installed inC:\Program FilesorC:\Program Files (x86).
- Newer Tkinter 8.6 reference
- Older Tkinter reference
download the pdf version of "Tkinter 8.5 reference a GUI for Python",
- There is an alternative site 8.5 refrerence
https://anzeljg.github.io/rin2/book2/2405/docs/tkinter/index.html
- Themed widgets
See what has already been done with widgets, view and install the external module ttkthemes:
pip install ttkthemes
found at "ttkthemes at github".
- Encoding and decoding images
Using the base64 module.
- Graphics editor
Check and edit images.
- PIL (Pillow)
Used extensively for drawing:
pip install Pillow
- Pretty Print.
Better display for some of the output:
pip install pprint
- colorsys
Colour conversion between RGB, HLV, etc:
pip install colorsys
- These words of wisdom
Go to github Putting on the Style! clone and unzip in your python playground, make sure that
examples,tablesandimagesstay at the same level in the directory structure, the other files and images are not relevant if you are viewing readthedocs.If you want to run it as a sphinx example unzip to your sphinx playground, then install sphinx and sphinx-rtd-theme.:
pip install sphinx pip install sphinx-rtd-theme
All the necessary files should be present, so from your os system switch to the
docsdirectory of the unzipped files and run the commandmake html, which should make a new subdirectory_build/html, where you can loadindex.html.
- Python IDE or code editor
An IDE is an Integrated Development Environment, used to control projects - probably most inexperienced users only need a code editor, certainly they are easier to learn. Idle and Thonny come with the Python installation, my choice would be Thonny. A second lightweight code editor is PyScripter (only available for Windows). More experienced users require an IDE and these are best for the individual to try, judge and select according to personal requirements.