terça-feira, 31 de janeiro de 2017

#path
Math/
    __init__.py
    divide.py
    minus.py
    multiply.py
    plus.py
#main.py
from plus import *
from minus import *
from multiply import *
from divide import *
#error run
Traceback (most recent call last):
  File "", line 1, in 
    import Math
  File ".\Math\__init__.py", line 1, in 
    from plus import *
ImportError: No module named 'plus'

#main.py solution
from .plus import *
from .minus import *
from .multiply import *
from .divide import *

0 comentários: