I am working on a simple Python (2.7.3) script, but I have to get the user\'s Home Folder. I tried:
import os
home_folder = os.environ[\"HOME\"]
<
Windows has no HOME environment variable. It uses USERPROFILE instead. To solve the problem you can define a new variable "HOME" typing on your console:
set HOME=%USERPROFILE%
as a copy of the USERPROFILE variable.
You can check that they are identical typing:
echo %USERPROFILE%
echo %HOME%
It will work for the current session.