As we saw in the previous recipe, all of the auto generated code of the UI we are designing with the Designer will be overwritten as soon as we rerun the pyuic5 utility. This is a good thing because it encourages us to design our Python modules in a modular fashion (hence the name module).
In this recipe, we will import the generated UI from a new Python module and add functionality within it. Whenever we rerun the pyuic5 utility, our code will not get accidentally overwritten, because we are separating the logic from the UI.
Separation of Concerns (SoC) is a software term that refers to the benefits of good, modular design.
So, let's write some code!