So as you can see, in my terminal, I was able to execute the file without error, but once I tried from the python shell, whether in the terminal or the one integrated in Emacs, there is an error, it doesn't know
It seems that to get the file name, I instead can use :
import inspect print(inspect.getfile(lambda: None)
But this feels like a hack more than proper python usage.
So generally how do other Emacs people face this issue of the
python-shell? It's probably not the only difference (is it?). Should I stop using this shell and use
term instead from now on to get the proper result of executing a python file?
(I'm rather new to both python and Emacs.)