I can not import my module containing python class. Everywhere it's said that if both files are in the same directory import should work fine but it seems like it doesn't. I have the following structure of folders which ar ein the same folder:
chapter_9 folder contains files:
9-10.py
9-1.py
9-4.py
9-7.py
9-9.py
restaurant.py
when I type the following in the 9-10.py file
import restaurant
it's saying "No module named restaurant." Why it is so? Both files are in the same folder. Tell me please if you know where I should dig?
Thanks.
__init__.py
? https://stackoverflow.com/questions/4142151/how-to-import-the-class-within-the-same-directory-or-sub-directory – Katu Apr 19 '18 at 10:13