[SciPy-User] Curse of recursive directory walking

Robert Kern robert.kern@gmail....
Wed Jul 29 23:42:35 CDT 2009


On Wed, Jul 29, 2009 at 22:19, Gökhan SEVER<gokhansever@gmail.com> wrote:

> I still couldn't figure out why os.walk() preserves the fileordering
> properly on samba mounted folders but not on my same local copies. The weird
> thing is it always walks the given directory tree in the same arbitrary
> order whenever I called the script.

The implementation of the filesystem determines what order you get
them back in. That's why you got a consistent arbitrary order in your
local copies. It is also why you get a consistent arbitrary order in
your Samba folders; Samba's arbitrary ordering just happens to be what
you consider to be properly sorted.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco


More information about the SciPy-User mailing list