summaryrefslogtreecommitdiffstats
path: root/Lib/user.py
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2002-09-05 21:08:25 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2002-09-05 21:08:25 (GMT)
commit609ba81cdbd18c5af1220f242402dc4c7ac923a4 (patch)
treec66157c42032d62d7217d353387114ab1718aa81 /Lib/user.py
parentbd9adab13801dcd4826488ac9afbd03c4b3f0ccf (diff)
downloadcpython-609ba81cdbd18c5af1220f242402dc4c7ac923a4.zip
cpython-609ba81cdbd18c5af1220f242402dc4c7ac923a4.tar.gz
cpython-609ba81cdbd18c5af1220f242402dc4c7ac923a4.tar.bz2
SF # 555779, import user doesn't work with CGIs
Diffstat (limited to 'Lib/user.py')
-rw-r--r--Lib/user.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/user.py b/Lib/user.py
index d0cb3ed..e550e52 100644
--- a/Lib/user.py
+++ b/Lib/user.py
@@ -26,6 +26,8 @@ import os
home = os.curdir # Default
if 'HOME' in os.environ:
home = os.environ['HOME']
+elif os.name == 'posix':
+ home = os.path.expanduser("~/")
elif os.name == 'nt': # Contributed by Jeff Bauer
if 'HOMEPATH' in os.environ:
if 'HOMEDRIVE' in os.environ: