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

Skip to content

Commit b23ee1d

Browse files
committed
Make the text generic, and call it os.path instead of posixpath.
1 parent 59d8b73 commit b23ee1d

1 file changed

Lines changed: 24 additions & 27 deletions

File tree

Doc/lib/libposixpath.tex

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,37 @@
1-
\section{\module{posixpath} ---
2-
Common \POSIX{} pathname manipulations.}
3-
\declaremodule{standard}{posixpath}
1+
\section{\module{os.path} ---
2+
Common pathname manipulations}
3+
\declaremodule{standard}{os.path}
44

5-
\modulesynopsis{Common \POSIX{} pathname manipulations.}
6-
7-
This module implements some useful functions on \POSIX{} pathnames.
8-
9-
\strong{Do not import this module directly.} Instead, import the
10-
module \module{os}\refstmodindex{os} and use \code{os.path}.
5+
\modulesynopsis{Common pathname manipulations.}
116

7+
This module implements some useful functions on pathnames.
128
\index{path!operations}
139

10+
1411
\begin{funcdesc}{abspath}{p}
1512
Return a normalized absolutized version of the pathname \var{p}. On
1613
most platforms, this is equivalent to
1714
\code{normpath(join(os.getcwd()), \var{p})}.
1815
\end{funcdesc}
1916

2017
\begin{funcdesc}{basename}{p}
21-
Return the base name of pathname
22-
\var{p}.
23-
This is the second half of the pair returned by
24-
\code{posixpath.split(\var{p})}.
18+
Return the base name of pathname \var{p}. This is the second half of
19+
the pair returned by \code{split(\var{p})}.
2520
\end{funcdesc}
2621

2722
\begin{funcdesc}{commonprefix}{list}
2823
Return the longest string that is a prefix of all strings in
29-
\var{list}.
30-
If
31-
\var{list}
32-
is empty, return the empty string (\code{''}).
24+
\var{list}. If \var{list} is empty, return the empty string
25+
(\code{''}).
26+
\end{funcdesc}
27+
28+
\begin{funcdesc}{dirname}{p}
29+
Return the directory name of pathname \var{p}. This is the first half
30+
of the pair returned by \code{split(\var{p})}.
3331
\end{funcdesc}
3432

3533
\begin{funcdesc}{exists}{p}
36-
Return true if
37-
\var{p}
38-
refers to an existing path.
34+
Return true if \var{p} refers to an existing path.
3935
\end{funcdesc}
4036

4137
\begin{funcdesc}{expanduser}{p}
@@ -44,16 +40,17 @@ \section{\module{posixpath} ---
4440
initial \samp{\~{}} is replaced by the environment variable
4541
\envvar{HOME}; an initial \samp{\~\var{user}} is looked up in the
4642
password directory through the built-in module
47-
\module{pwd}\refbimodindex{pwd}. If the expansion fails, or if the
48-
path does not begin with a tilde, the path is returned unchanged.
43+
\refmodule{pwd}\refbimodindex{pwd}. If the expansion fails, or if the
44+
path does not begin with a tilde, the path is returned unchanged. On
45+
the Macintosh, this always returns \var{p} unchanged.
4946
\end{funcdesc}
5047

5148
\begin{funcdesc}{expandvars}{p}
5249
Return the argument with environment variables expanded. Substrings
5350
of the form \samp{\$\var{name}} or \samp{\$\{\var{name}\}} are
5451
replaced by the value of environment variable \var{name}. Malformed
5552
variable names and references to non-existing variables are left
56-
unchanged.
53+
unchanged. On the Macintosh, this always returns \var{p} unchanged.
5754
\end{funcdesc}
5855

5956
\begin{funcdesc}{getsize}{filename}
@@ -66,16 +63,16 @@ \section{\module{posixpath} ---
6663
\versionadded{1.5.2}
6764
Return the time of last modification of \var{filename}. The return
6865
value is integer giving the number of seconds since the epoch (see the
69-
\module{time} module. Raise \exception{os.error} if the file does not
70-
exist or is inaccessible.
66+
\refmodule{time} module). Raise \exception{os.error} if the file does
67+
not exist or is inaccessible.
7168
\end{funcdesc}
7269

7370
\begin{funcdesc}{getatime}{filename}
7471
\versionadded{1.5.2}
7572
Return the time of last access of \var{filename}. The return
7673
value is integer giving the number of seconds since the epoch (see the
77-
\module{time} module. Raise \exception{os.error} if the file does not
78-
exist or is inaccessible.
74+
\refmodule{time} module). Raise \exception{os.error} if the file does
75+
not exist or is inaccessible.
7976
\end{funcdesc}
8077

8178
\begin{funcdesc}{isabs}{p}

0 commit comments

Comments
 (0)