How to Open files in Other Directories in Python
I was wondering if anyone can show me how to open another file from another directory in python and then return to the default script
Bootstrap_location= 'C:\ProgramData\TERMINAL\Boot_Strp' Bootstrap_App_Loc=os.path.join(Bootstrap_location+"Terminal_Bootstrapper.py") from Bootstrap_App_Loc import Terminal_Bootstrapper.py
Thanks in Advance
You need to add the path to the file if it is not already on the sys.path. The module name is the filename without the '.py'
import sys sys.path.append('C:\ProgramData\TERMINAL\Boot_Strp') import Terminal_Bootstrapper