Kaydet (Commit) 3fa440ea authored tarafından Guido van Rossum's avatar Guido van Rossum

Refinement of home for NT, courtesy Jeff Bauer.

üst 7c4cba83
......@@ -23,10 +23,15 @@ wishes to do different things depending on the Python version.
import os
try:
home = os.curdir # Default
if os.environ.has_key('HOME'):
home = os.environ['HOME']
except:
home = os.curdir
elif os.name == 'nt': # Contributed by Jeff Bauer
if os.environ.has_key('HOMEPATH'):
if os.environ.has_key('HOMEDRIVE'):
home = os.environ['HOMEDRIVE'] + os.environ['HOMEPATH']
else:
home = os.environ['HOMEPATH']
pythonrc = os.path.join(home, ".pythonrc.py")
try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment