[SciPy-User] Curse of recursive directory walking

Skipper Seabold jsseabold@gmail....
Thu Jul 30 10:24:45 CDT 2009

On Thu, Jul 30, 2009 at 12:42 AM, Robert Kern<robert.kern@gmail.com> wrote:
> 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.

Also note that Samba is based on the SMB protocol used by the Windows
network file system.  I use Samba to share my Linux folders over my
network to Windows boxes, so it makes sense that it's the same as the
Windows ordering.


More information about the SciPy-User mailing list