We will start extending the unit conversion application by taking a copy of the unitconverter
directory and the setup.py
scripts from the code written in Chapter 9, Creating Command-line Interfaces (a copy of this code is included in the code downloads for Chapter 9, Creating Command-line Interfaces).
We will then create a new module named gui
within the unitconverter
module. This will contain the Qt window that will provide a graphical interface to the unit conversion tool and the code that will launch it.
As we have done before, this is done by creating a directory named gui
inside the unitconverter
directory and a file named __init__.py
inside the gui
directory.
At this point, the code structure will be identical to that shown in the following image:
We must also install the libraries and tools required to develop the application. This includes the setuptools
utility for packaging Python code and the Qt framework and supporting utilities, including Qt Designer, which...