summaryrefslogtreecommitdiffstats
path: root/Doc/library/os.path.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/os.path.rst')
-rw-r--r--Doc/library/os.path.rst24
1 files changed, 19 insertions, 5 deletions
diff --git a/Doc/library/os.path.rst b/Doc/library/os.path.rst
index 4fce263..d04fd09 100644
--- a/Doc/library/os.path.rst
+++ b/Doc/library/os.path.rst
@@ -1,11 +1,9 @@
-
:mod:`os.path` --- Common pathname manipulations
================================================
.. module:: os.path
:synopsis: Operations on pathnames.
-
.. index:: single: path; operations
This module implements some useful functions on pathnames. To read or
@@ -31,6 +29,22 @@ applications should use string objects to access all files.
:func:`splitunc` and :func:`ismount` do handle them correctly.
+.. note::
+
+ Since different operating systems have different path name conventions, there
+ are several versions of this module in the standard library. The
+ :mod:`os.path` module is always the path module suitable for the operating
+ system Python is running on, and therefore usable for local paths. However,
+ you can also import and use the individual modules if you want to manipulate
+ a path that is *always* in one of the different formats. They all have the
+ same interface:
+
+ * :mod:`posixpath` for UNIX-style paths
+ * :mod:`ntpath` for Windows paths
+ * :mod:`macpath` for old-style MacOS paths
+ * :mod:`os2emxpath` for OS/2 EMX paths
+
+
.. function:: abspath(path)
Return a normalized absolutized version of the pathname *path*. On most
@@ -189,9 +203,9 @@ applications should use string objects to access all files.
.. function:: normcase(path)
- Normalize the case of a pathname. On Unix and MacOSX, this returns the path unchanged; on
- case-insensitive filesystems, it converts the path to lowercase. On Windows, it
- also converts forward slashes to backward slashes.
+ Normalize the case of a pathname. On Unix and Mac OS X, this returns the
+ path unchanged; on case-insensitive filesystems, it converts the path to
+ lowercase. On Windows, it also converts forward slashes to backward slashes.
.. function:: normpath(path)