Basic Python "import" question
Unsolved
Qt for Python
-
Voluntary removed
Posted in wrong forum -
@AnneRanch, this is for sure not Qt but pure python question so first of all you need to go to relevant community.
Im not a python expert but in generalimport
statement defines a scope that you import.
I.e. if you haveModule1
withClassA
,ClassB
withing then:- If you have
import Module1
you get access to all its content with dot-notation. You may useModule1.ClassA
andModule1.ClassB
in your code. - if you have
from Module1 import ClassB
Then you limit your import scope and can useClassB
only whileClassA
won't be available for you.
How to do it depends on your project and architecture.
- If you have