[Python-Dev] Import redesign [LONG]

Gordon McMillan gmcm@hypernet.com
Fri, 19 Nov 1999 16:56:20 -0500


[David Ascher got involuntarily forwarded]
> > Aside: it strikes me that for Python programs which import lots
> > of files, 'front-loading' the stat calls could make sense. 
> > When you first look at a directory in sys.path, you read the
> > entire directory in memory, and successive imports do a stat on
> > the directory to see if it's changed, and if not use the
> > in-memory data.  Or am I completely off my rocker here?

I posted something here about dircache not too long ago. 
Essentially, I found it completely unreliable on NT and on 
Linux to stat the directory. There was some test code 
attached.
 


- Gordon