From fbc190af4f1d993c1cdfb3c805c1ead2378f87e0 Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Tue, 6 May 2008 07:06:44 +0000 Subject: [PATCH] Fix os.walk docstring example - issue2707 --- Lib/os.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/os.py b/Lib/os.py index a36a6c8d351..cf6fe6fdd74 100644 --- a/Lib/os.py +++ b/Lib/os.py @@ -263,8 +263,9 @@ def walk(top, topdown=True, onerror=None): Example: + import os from os.path import join, getsize - for root, dirs, files in walk('python/Lib/email'): + for root, dirs, files in os.walk('python/Lib/email'): print root, "consumes", print sum([getsize(join(root, name)) for name in files]), print "bytes in", len(files), "non-directory files"