I have three files in folder
exceptions.py
class MyException(Exception):
pass
MyClass.py which begins as:
from exceptions import MyException
And empty __init__.py
When I'm trying to import MyClass.py there is Error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "MyClass.py", line 1, in <module>
from exceptions import MyException
ImportError: cannot import name MyException
I've read docs and a lot of articles but can't find what's wrong
import exceptionsand have a look whatdir(exceptions)has to say.