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

Skip to content

Commit b2afc81

Browse files
committed
Added os.altsep; this is '/' on DOS/Windows, and None on systems with
a sane filename syntax.
1 parent a28dab5 commit b2afc81

2 files changed

Lines changed: 16 additions & 4 deletions

File tree

Doc/lib/libos.tex

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,19 @@ \section{Standard Module \sectcode{os}}
5252
\end{datadesc}
5353

5454
\begin{datadesc}{sep}
55-
The character used by the OS to separate pathname components, e.g.\
56-
\code{'/'} for POSIX or \code{':'} for the Mac. Note that knowing this
55+
The character used by the OS to separate pathname components,
56+
e.g. \code{'/'} for POSIX or \code{':'} for the Mac. Note that knowing this
5757
is not sufficient to be able to parse or concatenate pathnames---better
5858
use \code{os.path.split()} and \code{os.path.join()}---but it is
5959
occasionally useful.
6060
\end{datadesc}
6161

62+
\begin{datadesc}{altsep}
63+
An alternative character used by the OS to separate pathname components,
64+
or \code{None} if only one separator character exists. This is set to
65+
\code{'/'} on DOS/Windows systems where \code{sep} is a backslash.
66+
\end{datadesc}
67+
6268
\begin{datadesc}{pathsep}
6369
The character conventionally used by the OS to separate search patch
6470
components (as in \code{\$PATH}), e.g.\ \code{':'} for POSIX or

Doc/libos.tex

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,19 @@ \section{Standard Module \sectcode{os}}
5252
\end{datadesc}
5353

5454
\begin{datadesc}{sep}
55-
The character used by the OS to separate pathname components, e.g.\
56-
\code{'/'} for POSIX or \code{':'} for the Mac. Note that knowing this
55+
The character used by the OS to separate pathname components,
56+
e.g. \code{'/'} for POSIX or \code{':'} for the Mac. Note that knowing this
5757
is not sufficient to be able to parse or concatenate pathnames---better
5858
use \code{os.path.split()} and \code{os.path.join()}---but it is
5959
occasionally useful.
6060
\end{datadesc}
6161

62+
\begin{datadesc}{altsep}
63+
An alternative character used by the OS to separate pathname components,
64+
or \code{None} if only one separator character exists. This is set to
65+
\code{'/'} on DOS/Windows systems where \code{sep} is a backslash.
66+
\end{datadesc}
67+
6268
\begin{datadesc}{pathsep}
6369
The character conventionally used by the OS to separate search patch
6470
components (as in \code{\$PATH}), e.g.\ \code{':'} for POSIX or

0 commit comments

Comments
 (0)