What is the correct cross-platform way to get the home directory in Python?
What is a cross-platform way to get the home directory? Question: I need to get the location of the home directory of the current logged-on user. Currently, I’ve been using the following on Linux: os.getenv("HOME") However, this does not work on Windows. What is the correct cross-platform way to do this ? Asked By: Nathan …
Total answers: 5