Hrvoje Niksic wrote:
<[EMAIL PROTECTED]> writes:
(dirpath, dirnames, filenames) = os.walk(scriptPath)
You're supposed to loop over values in different directories, like
this:
for dirpath, dirnames, filenames in os.walk(scriptPath):
... handle dirpath with dirnames and filenames ...
<[EMAIL PROTECTED]> writes:
> (dirpath, dirnames, filenames) = os.walk(scriptPath)
You're supposed to loop over values in different directories, like
this:
for dirpath, dirnames, filenames in os.walk(scriptPath):
... handle dirpath with dirnames and filenames ...
The loop will be execut
Hi everyone
The following code:
scriptPath = os.path.dirname(__file__)
(dirpath, dirnames, filenames) = os.walk(scriptPath)
print 'dirpath\n'
print dirpath
print 'dirnames\n'
pprint.pprint(dirnames)
print 'filenames\n'
pprint.pprint(filnames)
Fails on the os.walk call with the following error: