If your aim is to get the path of the home directory as argument, you can just make your user send it by making shell evaluate the argument before calling the script.
I have a simple script like -
import sys
print(sys.argv[1])
In Windows I call it as -
set HOME=D:\
python script.py %HOME%
The output I get is -
D:\
In Linux -
$ python hello.py $HOME
output -
/home/random/
If you want to get it from the environment variable, and you want to pass the environment variable to use as the first argument to the script, then you should change your script like -
sys.argv[1] = os.environ.get(sys.argv[1],sys.argv[1])
This would