A
Anthony Liu
Hi,
I think I got confused by the python import facility.
Say, in code1.py I have func1, func2, func3 and main.
In code2.py, I *only* want to use func2 from code1.py.
So, I did
from code1 import func2
But every time, I run code2.py, the main() of code1.py
is run.
I don't know why. Any hint please? Thanks.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
I think I got confused by the python import facility.
Say, in code1.py I have func1, func2, func3 and main.
In code2.py, I *only* want to use func2 from code1.py.
So, I did
from code1 import func2
But every time, I run code2.py, the main() of code1.py
is run.
I don't know why. Any hint please? Thanks.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com