diff options
author | Georg Brandl <georg@python.org> | 2009-04-27 16:20:50 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-04-27 16:20:50 (GMT) |
commit | e720c0aa74ca8e6cf350b808c6ca795e587ebf88 (patch) | |
tree | d98ed50657772424243a590928333f96a61bb525 /Doc/library/os.path.rst | |
parent | c67d362a89fe6076120f6de706725c313f515122 (diff) | |
download | cpython-e720c0aa74ca8e6cf350b808c6ca795e587ebf88.zip cpython-e720c0aa74ca8e6cf350b808c6ca795e587ebf88.tar.gz cpython-e720c0aa74ca8e6cf350b808c6ca795e587ebf88.tar.bz2 |
Merged revisions 72009 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r72009 | georg.brandl | 2009-04-27 17:29:09 +0200 (Mo, 27 Apr 2009) | 3 lines
Demote warnings to notices where appropriate, following the goal that as few "red box" warnings
should clutter the docs as possible. Part 1: stuff that gets merged to Py3k.
........
Diffstat (limited to 'Doc/library/os.path.rst')
-rw-r--r-- | Doc/library/os.path.rst | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/Doc/library/os.path.rst b/Doc/library/os.path.rst index d04fd09..99d106b 100644 --- a/Doc/library/os.path.rst +++ b/Doc/library/os.path.rst @@ -23,12 +23,11 @@ applications should use string objects to access all files. their parameters. The result is an object of the same type, if a path or file name is returned. -.. warning:: +.. note:: On Windows, many of these functions do not properly support UNC pathnames. :func:`splitunc` and :func:`ismount` do handle them correctly. - .. note:: Since different operating systems have different path name conventions, there @@ -288,6 +287,33 @@ applications should use string objects to access all files. *unc* will always be the empty string. Availability: Windows. +<<<<<<< .working +======= +.. function:: walk(path, visit, arg) + + Calls the function *visit* with arguments ``(arg, dirname, names)`` for each + directory in the directory tree rooted at *path* (including *path* itself, if it + is a directory). The argument *dirname* specifies the visited directory, the + argument *names* lists the files in the directory (gotten from + ``os.listdir(dirname)``). The *visit* function may modify *names* to influence + the set of directories visited below *dirname*, e.g. to avoid visiting certain + parts of the tree. (The object referred to by *names* must be modified in + place, using :keyword:`del` or slice assignment.) + + .. note:: + + Symbolic links to directories are not treated as subdirectories, and that + :func:`walk` therefore will not visit them. To visit linked directories you must + identify them with ``os.path.islink(file)`` and ``os.path.isdir(file)``, and + invoke :func:`walk` as necessary. + + .. note:: + + This function is deprecated and has been removed in 3.0 in favor of + :func:`os.walk`. + + +>>>>>>> .merge-right.r72009 .. data:: supports_unicode_filenames True if arbitrary Unicode strings can be used as file names (within limitations |