[Python-checkins] python/dist/src/Doc/lib libos.tex,1.124,1.125
gvanrossum@users.sourceforge.net
gvanrossum@users.sourceforge.net
Tue, 13 May 2003 11:01:22 -0700
- Previous message: [Python-checkins] python/dist/src/Misc NEWS,1.764,1.765
- Next message: [Python-checkins] python/dist/src/Tools/scripts byteyears.py,1.8,1.9 dutree.py,1.11,1.12 eptags.py,1.8,1.9 finddiv.py,1.1,1.2 fixdiv.py,1.7,1.8 fixheader.py,1.5,1.6 fixps.py,1.5,1.6 ftpmirror.py,1.17,1.18 ifdef.py,1.5,1.6 mkreal.py,1.6,1.7 objgraph.py,1.6,1.7 pindent.py,1.11,1.12 ptags.py,1.7,1.8 suff.py,1.5,1.6 untabify.py,1.3,1.4 which.py,1.10,1.11
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv31799
Modified Files:
libos.tex
Log Message:
Add optional 'onerror' argument to os.walk(), to control error
handling.
Index: libos.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libos.tex,v
retrieving revision 1.124
retrieving revision 1.125
diff -C2 -d -r1.124 -r1.125
*** libos.tex 10 May 2003 03:35:37 -0000 1.124
--- libos.tex 13 May 2003 18:01:19 -0000 1.125
***************
*** 1055,1059 ****
\end{funcdesc}
! \begin{funcdesc}{walk}{top\optional{, topdown\code{=True}}}
\index{directory!walking}
\index{directory!traversal}
--- 1055,1060 ----
\end{funcdesc}
! \begin{funcdesc}{walk}{top\optional{, topdown\code{=True}
! \optional{, onerror\code{=None}}}}
\index{directory!walking}
\index{directory!traversal}
***************
*** 1087,1090 ****
--- 1088,1098 ----
false is ineffective, because in bottom-up mode the directories in
\var{dirnames} are generated before \var{dirnames} itself is generated.
+
+ By default errors from the \code{os.listdir()} call are ignored. If
+ optional argument \var{onerror} is specified, it should be a function;
+ it will be called with one argument, an os.error instance. It can
+ report the error to continue with the walk, or raise the exception
+ to abort the walk. Note that the filename is available as the
+ \code{filename} attribute of the exception object.
\begin{notice}
- Previous message: [Python-checkins] python/dist/src/Misc NEWS,1.764,1.765
- Next message: [Python-checkins] python/dist/src/Tools/scripts byteyears.py,1.8,1.9 dutree.py,1.11,1.12 eptags.py,1.8,1.9 finddiv.py,1.1,1.2 fixdiv.py,1.7,1.8 fixheader.py,1.5,1.6 fixps.py,1.5,1.6 ftpmirror.py,1.17,1.18 ifdef.py,1.5,1.6 mkreal.py,1.6,1.7 objgraph.py,1.6,1.7 pindent.py,1.11,1.12 ptags.py,1.7,1.8 suff.py,1.5,1.6 untabify.py,1.3,1.4 which.py,1.10,1.11
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]