Using Tkinter to create graphical user interfaces
We will create a basic GUI to allow the user to enter information, and the program can then be used to encrypt and decrypt it.
Getting ready
You must ensure that this file is placed in the same directory.
Note
Since we are using Tkinter (one of many available add-ons for Python), we need to ensure that it is installed. It should be installed by default on the standard Raspbian image. We can confirm it is installed by importing it from the Python prompt, as follows:
Python3
>>> import tkinter
If it is not installed, an ImportError
exception will be raised, in which case you can install it using the following command (use Ctrl + Z to exit the Python prompt):
sudo apt-get install python3-tk
If the module did load, you can use the following command to read more about the module (use Q to quit when you are done reading):
>>>help(tkinter)
You can also get information about all the classes, functions, and methods within the...