Help with simple python code.

Last question, I am trying to store the 4 python files in a sub folder to the main.py file. I have a this folder structure /script/ran/. /script holds the main file and /ran holds the 4 files with the required functions. Obviously the main.py is looking for the function rc1 but is unable to find it. Attempting to change the working directory of the main.py file didn't seem to work. Neither did setting up a init.py file. Though I might have done something wrong in either case. Should it work changing the working directory with: import os os.chdir("/home/pi/script/ran")

If /ran is the location of my 4 scripts?

Sorry to bother you with such obvious questions.

/r/learnpython Thread Parent