Assume I have the following package structure:
A/
__init__.py
B.py
C.py
Test.py
Now I am wondering what would be the difference between the following two lines of code:
from A.B import *
import A.B
I know the first line will import everything from the B.py but then what is the point of the second line if it does not import the content of the B.py?
If it is bad to write from A.B import *
EDIT: then how about using
from A import *
This will run everything in the init.py file. Can anyone explain what is wrong with the statement and why it should not be used? I thought importing a package is like running it so if I write
import A
Then I automatically run the init.py, is this correct?