Re: In win32 and linux platform, os modules has diffreent output order, is it a bug?

2013-03-01 Thread Nobody
On Fri, 01 Mar 2013 17:24:05 +0800, Honghe Wu wrote: > Thanks! Cause I need sorted returnd list, and the arbitrary list makes the > other procedure go wrong. Maybe the I/O speed is more important in other > cases. You can sort the lists of files and subdirectories with e.g.: for root, di

Re: In win32 and linux platform, os modules has diffreent output order, is it a bug?

2013-03-01 Thread Honghe Wu
Thanks! Cause I need sorted returnd list, and the arbitrary list makes the other procedure go wrong. Maybe the I/O speed is more important in other cases. On Mar 1, 2013 4:55 PM, "Chris Rebert" wrote: > On Fri, Mar 1, 2013 at 12:43 AM, Honghe Wu wrote: > > env: python 2.7.3 > > > > 6 test files'

Re: In win32 and linux platform, os modules has diffreent output order, is it a bug?

2013-03-01 Thread Chris Rebert
On Fri, Mar 1, 2013 at 12:43 AM, Honghe Wu wrote: > env: python 2.7.3 > > 6 test files' name in a directory as below: > 12ab Abc Eab a1bc acd bc > > the following is test code: > for root, dirs, files in os.walk(os.getcwd()): > print files > > the output in win32 platform is: > ['12ab', '

Re: In win32 and linux platform, os modules has diffreent output order, is it a bug?

2013-03-01 Thread Benjamin Kaplan
On Fri, Mar 1, 2013 at 12:43 AM, Honghe Wu wrote: > env: python 2.7.3 > > 6 test files' name in a directory as below: > 12ab Abc Eab a1bc acd bc > > the following is test code: > for root, dirs, files in os.walk(os.getcwd()): > print files > > the output in win32 platform is: > ['12ab', '

In win32 and linux platform, os modules has diffreent output order, is it a bug?

2013-03-01 Thread Honghe Wu
env: python 2.7.3 6 test files' name in a directory as below: 12ab Abc Eab a1bc acd bc the following is test code: for root, dirs, files in os.walk(os.getcwd()): print files the output in win32 platform is: ['12ab', 'a1bc', 'Abc', 'acd', 'bc', 'Eab'] but in linux is: ['Eab', 'acd', 'a1