0
I’m going crazy here. I’m facing a problem that should have been solved by logic already. The problem is this:
I have two folders:
- Novapasta/
- Novafolder/classes
In the first folder there is a file:
- Novapasta/main.py
In the second folder, there are two files:
- New folder/classes/classPrint.py
- New folder/classes/classGerar.py
The logic is as follows:
- I open the main.
- The main one matters the class classPrint
- The class classPrint matters of class classGerar
So far so good. In the main.py file is the following:
from classes import classPrint
objeto = classPrint.printar()
print(objeto.b)
In the classPrint file is this code:
import classGerar
objeto = classGerar.Gerar()
class printar():
b = objeto.a
The problem is that classPrint cannot import the Gerar class. Both classes are in the same folder. But, one cannot import the other.
Obs: If I put main.py in the same class folder. Main works correctly.
Someone has faced this problem and knows the solution?
For now, I’ll leave everything in the same folder and create a main shortcut. I wanted to solve this problem to have more code organization. But this bone is.
– Sarutobi sama