Scott David Daniels wrote: >>> Is the interpreter unable to call "C" functions ("stat" for example) >>> to determine whether an object exists before it puts it on "path". >> >> >> What do you mean, "unable to"? It just doesn't. > > In fact, the interpreter doesn't necessarily know when it is > affecting the path.
Now I remember what makes this stuff really difficult: PEP 302 introduces path hooks (sys.path_hooks), allowing imports from other sources than files. So the items on sys.path don't have to be directory or file names at all, and importing from them may still succeed if though stat fails. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list