Re: Problems with os.walk

2008-05-08 Thread Scott David Daniels
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 ...

Re: Problems with os.walk

2008-05-08 Thread Hrvoje Niksic
<[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

Problems with os.walk

2008-05-08 Thread Dominique.Holzwarth
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: