directory
Peter Hansen
peter at engcorp.com
Wed Jun 19 21:18:56 EDT 2002
"James T. Dennis" wrote:
>
> os.path.walk() uses an awkward interface. I wrote and posted this a couple
> of months ago:
>
> #!/usr/bin/env python2.2
> ## Change the shebang line to match your needs!
> import os
> def dirwalk(startdir=None):
> if not startdir:
> startdir="."
....
I guess this needs the following line before the "import os" ?
from __future__ import generators
I'm using standard 2.2.1, I think, and although I vaguely thought
generators were already enabled by default I guess they are not.
Have you modified your site.py or something?
-Peter
More information about the Python-list
mailing list