Commit b2afc811 authored by Guido van Rossum's avatar Guido van Rossum

Added os.altsep; this is '/' on DOS/Windows, and None on systems with

a sane filename syntax.
parent a28dab5e
...@@ -52,13 +52,19 @@ e.g. \code{'..'} for POSIX or \code{'::'} for the Mac. ...@@ -52,13 +52,19 @@ e.g. \code{'..'} for POSIX or \code{'::'} for the Mac.
\end{datadesc} \end{datadesc}
\begin{datadesc}{sep} \begin{datadesc}{sep}
The character used by the OS to separate pathname components, e.g.\ The character used by the OS to separate pathname components,
\code{'/'} for POSIX or \code{':'} for the Mac. Note that knowing this e.g. \code{'/'} for POSIX or \code{':'} for the Mac. Note that knowing this
is not sufficient to be able to parse or concatenate pathnames---better is not sufficient to be able to parse or concatenate pathnames---better
use \code{os.path.split()} and \code{os.path.join()}---but it is use \code{os.path.split()} and \code{os.path.join()}---but it is
occasionally useful. occasionally useful.
\end{datadesc} \end{datadesc}
\begin{datadesc}{altsep}
An alternative character used by the OS to separate pathname components,
or \code{None} if only one separator character exists. This is set to
\code{'/'} on DOS/Windows systems where \code{sep} is a backslash.
\end{datadesc}
\begin{datadesc}{pathsep} \begin{datadesc}{pathsep}
The character conventionally used by the OS to separate search patch The character conventionally used by the OS to separate search patch
components (as in \code{\$PATH}), e.g.\ \code{':'} for POSIX or components (as in \code{\$PATH}), e.g.\ \code{':'} for POSIX or
......
...@@ -52,13 +52,19 @@ e.g. \code{'..'} for POSIX or \code{'::'} for the Mac. ...@@ -52,13 +52,19 @@ e.g. \code{'..'} for POSIX or \code{'::'} for the Mac.
\end{datadesc} \end{datadesc}
\begin{datadesc}{sep} \begin{datadesc}{sep}
The character used by the OS to separate pathname components, e.g.\ The character used by the OS to separate pathname components,
\code{'/'} for POSIX or \code{':'} for the Mac. Note that knowing this e.g. \code{'/'} for POSIX or \code{':'} for the Mac. Note that knowing this
is not sufficient to be able to parse or concatenate pathnames---better is not sufficient to be able to parse or concatenate pathnames---better
use \code{os.path.split()} and \code{os.path.join()}---but it is use \code{os.path.split()} and \code{os.path.join()}---but it is
occasionally useful. occasionally useful.
\end{datadesc} \end{datadesc}
\begin{datadesc}{altsep}
An alternative character used by the OS to separate pathname components,
or \code{None} if only one separator character exists. This is set to
\code{'/'} on DOS/Windows systems where \code{sep} is a backslash.
\end{datadesc}
\begin{datadesc}{pathsep} \begin{datadesc}{pathsep}
The character conventionally used by the OS to separate search patch The character conventionally used by the OS to separate search patch
components (as in \code{\$PATH}), e.g.\ \code{':'} for POSIX or components (as in \code{\$PATH}), e.g.\ \code{':'} for POSIX or
......
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