[SciPy-User] Curse of recursive directory walking
Wed Jul 29 16:14:12 CDT 2009
On Wed, Jul 29, 2009 at 9:48 AM, <email@example.com> wrote:
> To me it looks more like it is a problem with relative file paths and
> changing directories and not with recursion.
> I never had problems with os.walk or any home made recursive directory
> walker, but I always used absolute paths.
> from the python 2.5 docs
> Note: If you pass a relative pathname, don't change the current
> working directory between resumptions of walk(). walk() never changes
> the current directory, and assumes that its caller doesn't either.
I have one more question on os.walk()
For some reason while this function working on my local folders I walks
through them in a randomly manner. However when I run the same script on a
network mounted drive (using the same directory structure) it walks through
them in an alphabetically sorted order.
Have you encountered a similar behaviour before?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-User