Dieter Maurer wrote: > The question was: > > "should python start up with **non-existent** objects on the path". > > I think there is no reason why path needs to contain an object > which does not exist (at the time the interpreter starts).
There is. When the interpreter starts, it doesn't know what object do or do not exist. So it must put python24.zip on the path just in case. > In your use case, "python24.zip" does exist and therefore may > be on the path. When "python24.zip" does not exist, it does > not contain anything and especially not "site.py". Yes, but the interpreter cannot know in advance whether python24.zip will be there when it starts. > I recently analysed excessive import times and > saw thousands of costly and unneccesary filesystem operations due to: Hmm. In my Python 2.4 installation, I only get 154 open calls, and 63 stat calls on an empty Python file. So somebody must have messed with sys.path really badly if you saw thoughsands of file operations (although I wonder what operating system you use so that failing open operations are costly; most operating systems should do them very efficiently). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list