I am trying to store the path of a script into a variable using:
os.path.abspath(os.path.dirname(__file__))
However, it keeps returning a name '__file__' is not defined error.
here = os.path.dirname(os.path.abspath(__file__))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name '__file__' is not defined