File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3727,16 +3727,16 @@ features:
37273727
37283728 This example displays the number of bytes taken by non-directory files in each
37293729 directory under the starting directory, except that it doesn't look under any
3730- CVS subdirectory::
3730+ `` __pycache__ `` subdirectory::
37313731
37323732 import os
3733- for root, dirs, files, rootfd in os.fwalk('python/Lib/email '):
3733+ for root, dirs, files, rootfd in os.fwalk('python/Lib'):
37343734 print(root, "consumes", end="")
37353735 print(sum([os.stat(name, dir_fd=rootfd).st_size for name in files]),
37363736 end="")
37373737 print("bytes in", len(files), "non-directory files")
3738- if 'CVS ' in dirs:
3739- dirs.remove('CVS ') # don't visit CVS directories
3738+ if '__pycache__ ' in dirs:
3739+ dirs.remove('__pycache__ ') # don't visit __pycache__ directories
37403740
37413741 In the next example, walking the tree bottom-up is essential:
37423742 :func: `rmdir ` doesn't allow deleting a directory before the directory is
You can’t perform that action at this time.
0 commit comments