[Python-checkins] python/dist/src/Doc/lib libstat.tex,1.22,1.22.6.1
montanaro@users.sourceforge.net
montanaro@users.sourceforge.net
Thu, 19 Jun 2003 11:14:04 -0700
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv24312
Modified Files:
Tag: release22-maint
libstat.tex
Log Message:
Avoid 'dir' as a variable name. Use os.path.join() to join path elements
together.
Index: libstat.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstat.tex,v
retrieving revision 1.22
retrieving revision 1.22.6.1
diff -C2 -d -r1.22 -r1.22.6.1
*** libstat.tex 28 Nov 2001 07:26:15 -0000 1.22
--- libstat.tex 19 Jun 2003 18:14:02 -0000 1.22.6.1
***************
*** 130,139 ****
from stat import *
! def walktree(dir, callback):
! '''recursively descend the directory rooted at dir,
calling the callback function for each regular file'''
! for f in os.listdir(dir):
! pathname = '%s/%s' % (dir, f)
mode = os.stat(pathname)[ST_MODE]
if S_ISDIR(mode):
--- 130,139 ----
from stat import *
! def walktree(top, callback):
! '''recursively descend the directory tree rooted at top,
calling the callback function for each regular file'''
! for f in os.listdir(top):
! pathname = os.path.join(top, f)
mode = os.stat(pathname)[ST_MODE]
if S_ISDIR(mode):