I know that I can import a python module by using their file path, but is there a way to import a file relative to the current file's position?
For example, it seems like I can "import file" only if the script is in the same folder as the one I am working with. How can I import the file if it's in the folder outside of mine, or one below the hierarchy, without giving the full file path? I would like it so that I can move the project folder around and still have everything work.
I'm afraid that is impossible to import single python files using their paths.
In python you have to deal with modules. The finest solution would be to create a module from your outside-folder script and put in your system modules path.
Importing modules in the same project folder