From main.py, I want to import a file from the backend folder
WebAppName/main.py
WebAppName/backend/handlers.py
How do I specify this as an import statement
I am aware that importing from the same folder is just import handlers
But this is a child directory, so how do I do this?
When you do an import, Python searchs for whatever you are importing in the directories listed in sys.path, which is a Python list. To make a module or other code source importable, simply append the path to the code source to sys.path:
After that line, then do your import of handlers and it will work.
good luck,
Mike