Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c12909b

Browse files
author
Skip Montanaro
committed
add note about os.path.join and drive letters on Windows.
1 parent 6dd7d07 commit c12909b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Doc/lib/libposixpath.tex

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,10 @@ \section{\module{os.path} ---
123123
an absolute path, all previous components are thrown away, and joining
124124
continues. The return value is the concatenation of \var{path1}, and
125125
optionally \var{path2}, etc., with exactly one slash (\code{'/'})
126-
inserted between components, unless \var{path} is empty.
126+
inserted between components, unless \var{path} is empty. Note that on
127+
Windows, since there is a current directory for each drive,
128+
{}\function{os.path.join("c:", "foo")} represents a path relative to the
129+
current directory on drive C:, not \code{c:\\foo}.
127130
\end{funcdesc}
128131

129132
\begin{funcdesc}{normcase}{path}

0 commit comments

Comments
 (0)