We started with the GUI_TCP_IP.py file from the previous chapter and reorganized the widgets.
We renamed several widgets and separated the code that accesses the MySQL data to what used to be named Tab 1, and we moved the unrelated widgets to what we named Tab 2 in the previous recipes. We also adjusted some internal Python variable names so that we can understand our code better.
The refactored module is close to 400 lines of Python code and it would take too many pages to show the entire code here. On Windows, we can use a tool called WinMerge to compare different Python code modules. I am sure there are similar tools for macOS and Linux.