Performance when working directory is slow network drive

Mark Hadfield m.hadfield at niwa.cri.nz
Sun Mar 4 15:55:29 EST 2001


"Mark Hadfield" <m.hadfield at niwa.cri.nz> wrote in message
news:983480535.813990 at clam-ext...
> Now only two things puzzle me:

To save you all sleepless nights wondering about the answers to the
questions that I posed, here are the answers.

> 1. Why having the current directory in the search path affects the import
> time for the os module much more than it does for other modules I tested
> (like string). Is this because os is a package?

Basically, yes. Thanks to Fredrick Lundh for suggesting I look at the output
from "python -vv".

> 2. Why the number of empty-string entries at the head of sys.path varies
> between 0 and 2 on my system depending on how the interpreter is invoked
and
> what I ate for breakfast (or something).

One of the empty-string entries occurred because I had a sub-key with an
empty value by mistake under

HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.0\PythonPath

The other is explained in the documentation for sys.path in the Library
Reference.

Thanks to Sean Reifschnedier and Fredrik Lundh for helping me with this and
to them & everyone else for not abusing me.

---
Mark Hadfield
m.hadfield at niwa.cri.nz  http://katipo.niwa.cri.nz/~hadfield
National Institute for Water and Atmospheric Research





More information about the Python-list mailing list