How to import modules that are used in both the main code and a module correctly?
- by Deniz
Let's assume I have a main script, main.py, that imports another python file with 'import coolfunctions' and another: 'import chores'
Now, suppose coolfunctions also uses stuff from chores, hence I declare 'import chores' inside coolfunctions.
Since both main.py, and coolfunctions import chores ~ is this redundant? Is there any other way of doing this? Am I doing it correctly?
I'm confused about how python projects should be structured in general. I have a "conf.py" file, that I import for a bunch of variables ~ is this a module or not? I load this conf file in multiple places as well.