[Python-checkins] python/dist/src/Doc/lib libposixpath.tex, 1.41, 1.42

birkenfeld@users.sourceforge.net birkenfeld at users.sourceforge.net
Wed Aug 24 09:27:05 CEST 2005


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22611/Doc/lib

Modified Files:
	libposixpath.tex 
Log Message:
bug [ 1193849 ] os.path.expanduser documentation wrt. empty $HOME



Index: libposixpath.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libposixpath.tex,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- libposixpath.tex	22 Dec 2004 05:40:45 -0000	1.41
+++ libposixpath.tex	24 Aug 2005 07:26:55 -0000	1.42
@@ -55,12 +55,20 @@
 \end{funcdesc}
 
 \begin{funcdesc}{expanduser}{path}
-Return the argument with an initial component of \samp{\~} or
-\samp{\~\var{user}} replaced by that \var{user}'s home directory.  An
-initial \samp{\~{}} is replaced by the environment variable
-\envvar{HOME}; an initial \samp{\~\var{user}} is looked up in the
-password directory through the built-in module
-\refmodule{pwd}\refbimodindex{pwd}.  If the expansion fails, or if the
+On \UNIX, return the argument with an initial component of \samp{\~} or
+\samp{\~\var{user}} replaced by that \var{user}'s home directory.
+An initial \samp{\~} is replaced by the environment variable
+\envvar{HOME} if it is set; otherwise the current user's home directory
+is looked up in the password directory through the built-in module
+\refmodule{pwd}\refbimodindex{pwd}.
+An initial \samp{\~\var{user}} is looked up directly in the
+password directory.
+
+On Windows, only \samp{\~} is supported; it is replaced by the
+environment variable \envvar{HOME} or by a combination of
+\envvar{HOMEDRIVE} and \envvar{HOMEPATH}.
+
+If the expansion fails or if the
 path does not begin with a tilde, the path is returned unchanged.
 \end{funcdesc}
 
@@ -158,7 +166,7 @@
 
 \begin{funcdesc}{normpath}{path}
 Normalize a pathname.  This collapses redundant separators and
-up-level references, e.g. \code{A//B}, \code{A/./B} and
+up-level references so that \code{A//B}, \code{A/./B} and
 \code{A/foo/../B} all become \code{A/B}.  It does not normalize the
 case (use \function{normcase()} for that).  On Windows, it converts
 forward slashes to backward slashes. It should be understood that this may
@@ -234,7 +242,7 @@
 directory, the argument \var{names} lists the files in the directory
 (gotten from \code{os.listdir(\var{dirname})}).
 The \var{visit} function may modify \var{names} to
-influence the set of directories visited below \var{dirname}, e.g., to
+influence the set of directories visited below \var{dirname}, e.g. to
 avoid visiting certain parts of the tree.  (The object referred to by
 \var{names} must be modified in place, using \keyword{del} or slice
 assignment.)



More information about the Python-checkins mailing list