[Python-ideas] Speed up os.walk() 5x to 9x by using file attributes from FindFirst/NextFile() and readdir()

Greg Ewing greg.ewing at canterbury.ac.nz
Thu Nov 15 03:13:15 CET 2012


On 15/11/12 14:37, Ben Hoyt wrote:
>
>> 1) Is there some way to distinguish that your st_mode field is only
>> partially there (i.e. - you get the Linux/BSD d_type value, but not
>> the rest of st_mode)?
>
> Not currently. I haven't thought about this too hard -- there way be a
> bit that's always set/not set within st_mode itself.

Maybe the call should have a bit mask indicating which of
the st_mode fields you want populated.

-- 
Greg




More information about the Python-ideas mailing list