We start by importing two modules; the first is our own encryptdecrypt module and the second is the tkinter module. To make it easier to see which items have come from where, we use ENC/TK. If you want to avoid the extra reference, you can use from <module_name> import * to refer to the module items directly.
The encryptButton() and decryptButton() functions will be called when we click on the Encrypt and Decrypt buttons; they are explained in the following sections.
The main Tkinter window is created using the Tk() command, which returns the main window where all the widgets/controls can be placed.
We will define six controls as follows:
- Label: This displays the prompt Enter message to encrypt:
- Entry: This provides a textbox ...