3
I have the following directory structure
src\
conectores\
mysql.py
bibliotecas
auxiliares
teste\
chamarMysql.py
In the above structure as I can from inside the test file call Myql.py, call a class that is in src mysql connectors.py?
Excuse the ignorance, but and in the file I am working from there I put only the name of the file without the . py, as I normally do when files are in the same directory?
– Bruno Bermann
@Brunobermann should put a filename init.py in all folders and subfolders of your python project.
– Rui Lima
I just don’t understand how I import the file that is one level below and inside another directory with subdirectory.
– Fábio Jânio
As usual, just put in this case the "import mysql" line in the file where you want to import the module. No need to set the directory.
– Rui Lima