my_module
is a folder not a module and you can't import a folder, try moving my_mod.py
to the same folder as the cool_script.py
and then doimport my_mod as mm
. This is because python only looks in the current directory and sys.path
, and so wont find my_mod.py
unless it's in the same directory
Or you can look here for an answer telling you how to import from other directories.
As to your other questions, I do not know as I do not use PyCharm.