I created some simple modules for learning purposes containing simple classes and functions and tried to import it for the shell. Unfortunately TraceBack Error occurs.
I've checked os.getcwd()
and I'm in the directory with all those modules. I also created modules with both pycharm and shell itself (open("filename","w")
and stuff) and still python cannot find them.
Do you have any idea what's the reason of such matters?
import komendy
Error:
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
ModuleNotFoundError: No module named 'komendy'
They are in same folder:
>>> os.listdir()
['komendy.py', 'zmienne.py', 'venv', 'mordeczko.txt', 'mordo', '.idea']
Ideas?