I have the following project structure:
root
/scripts
script.py
/scrapers
scraper.py
/helpers
helper.py
How can I import helper.py
in script.py
or scraper.py
?
The only way I got this to work was by keeping all scripts and scrapers inside the same folder and move helpers folder inside that folder with a __init__.py
in it, like this:
root
/lib
script.py
scraper.py
/helpers
__init__.py
helper.py
Is there a better way?
I'm on VS Code with Python 3.9.0 and using venv.