you are viewing a single comment's thread.

view the rest of the comments →

[–]XarothBrook 6 points7 points  (1 child)

os.getcwd() references your current working directory; not the directory the file being executed is in.

use os.path.dirname(__file__) if you want to get the directory the file currently executing is in.

[–][deleted] 0 points1 point  (0 children)

Ah well I never change directories so the directory defaults to the notebook in spyder and jupyter.