I have the following code structure in python:
Application
├── app
│ ├── data/
│ ├── utils/
│ │ └── utils.py
│ └── main.py
├── utils2/
│ └── utils2.py
└── main2.py
I downloaded the code in the folder app/ from github, so when we run the file main.py, the data is imported in the utils.py file as :
from data import *
Now when I need to run main2.py, I need to access the functions in utils.py, and also the files in folder data, so for that I need to import the data in utils.py as
from app.data import *
This is creating a problem when running main.py and main2.py What is the correct way of importing and using the folders and files so that only one import statement works for both scenarios?
I am using python 3.9