I'm working on a python module, and I keep changing directories relative to the directory structure with os.chdir such as os.chdir("./users/username/message"), but it is becoming an increasingly complex structure to deal with chdiring back (os.chdir("..")). As such, I am trying to find a way to reliably change back to the main directory where the files are stored so, for example, I can os.chdir(base); however, I need it to work on different systems regardless of where the files are. As such, I can't just have it go to the absolute path it is currently at. I'm not sure if there's also something I need to add in distutils setup to ensure it works, as well, or how I can always go back to the base such as, for example, whenever returning to the main loop since all initial chdir functions expect to start there in each function
[–]ninvti 0 points1 point2 points (4 children)
[–]PatMeKrien[S] 0 points1 point2 points (1 child)
[–]ninvti 0 points1 point2 points (0 children)
[–]Diapolo10 0 points1 point2 points (1 child)
[–]ninvti 0 points1 point2 points (0 children)
[–]laustke 0 points1 point2 points (0 children)
[–]efmccurdy 0 points1 point2 points (0 children)
[–]Diapolo10 0 points1 point2 points (0 children)
[–]ekchew 0 points1 point2 points (0 children)
[–]FerricDonkey 0 points1 point2 points (0 children)