Having a strange error here. I had a previous directory structured as follows
main.py
foldername
modulename.py
now in main.py I called modulename.py by using import modulename.py as mn
now I am making changes but I still want to use the modules as before, so in a completely different location on my computer I have set up the structure as before:
newmain.py
foldername
modulename.py
to make sure I am working in the right directory I used:
import os
os.chdir('NewMainPath/')
which correctly sets the directory of the file but if I now use
import modulename.py as mn
it for some reason is linking to the previous modulename.py That means if I make any changes it won't pick them up and is just linking to the previous location and I can't figure out why.