Code: Select all
dir_mods = ~/Documents/FTL mods
^
SyntaxError: invalid syntax

Code: Select all
dir_mods = "~/Documents/FTL mods"
dir_root is actually the name of variable, a place in memory that contains whatever the program author wants it to contain, with whatever name the program author wants. In the present case, obviously, this piece of memory contains the directory where the Mod Manager resides. Using the os.path.join instruction, you told Python to compute a new directory name, composed of whatever was in dir_root, and then "mods", and to store the result in the variable named dir_mods. You are right that you could add deeper subdirectories this way, though the proper way to write the instruction, so that it also works on Windows (with backslashes instead of slashes) would be os.path.join(dir_root, 'mods', 'subfolder').I'm guessing that "dir_root" is the way of making the .py file you're running the root (so it can have a relative filepath), and then 'mods' is the folder (I think it's case-sensitive). Would 'mods/subfolder' then go to a folder/file inside mods?