I have a main.py file that includes a number of functions, classes as well as global variables (some of which are used as constants while others are used as global variables).
(I know that as a rule the use of global variables is not a good practice but in my case there is no hazard).
Additionally, the main.py imports a number of modules that are used either by the main.python (main function within it), or/and by the functions and classes within the main.py.
So, I'd like to split the code into more .py files, for example move the "assistant" functions in a separate file e.g. assistantFuncts.py.
Now, both main.py and assistantFuncts.py may use common modules, e.g. smtplib, and share common global variables
In the above case, do I have to import smtplib in both .py files? Additionally, do I need to declare as global the shared variables used by both files, in both files? And how about the initialization of the variables?
I expected that importing and declaring them in the main.py would be enough, but it seems that it is not...