I am beginner in python
i have following directory structure
python_programs/ addition.py info/_init_.py msg1.py msg2.py msg3.py In addition.py i have the following code:-
import Info Info.msg1() Info.msg2() Info.msg3() In init.py i have the following code
from msg1 import msg1 from msg2 import msg2 from msg3 import msg3 In msg1.py i have the following code:-
def msg1(): print "This is msg1" In msg2.py i have the following code:-
def msg2(): print "This is msg2" In msg3.py i have the following code:-
def msg3(): print "This is msg3" but when i tried to run the addition.py file
it is giving me error:-
Traceback (most recent call last): File "addition.py", line 2, in <module> import Info ImportError: No module named Info
__init__.pyrequires two underscores before and afterinit. You have only one on either side.info, all lower case, but your code importsInfo, with a capitalI.