doctest import failure

Tim Peters tim.one at comcast.net
Fri Aug 30 04:30:48 CEST 2002


[j vickroy]
> The suggestion to run Python -v was perfect: I must read about
> these command line options!

-v is the only useful one <wink>.

> It revealed an old copy of inspect.py on a hard drive I had not searched
> because there was no way the Python interpreter could find it there
> <sigh>.  I still do not understand how it was found because I supposedly
> do not define PYTHONPATH so that everything used is in
> \PYTHON22\LIB \site-packages.

I'm afraid Usenet isn't big enough to hold all the rules that go into
determining the path, and especially not on Windows.  import sys, then do
"print sys.path".  Your path is almost certainly more convoluted than you
believe it is.  This is especially so since you're running from a directory
other than Python's installation directory, so Python has to slay chickens
and examine their entrails under the covers to try to guess where
appropriate libraries may be.  Once you get over the futile denial that it
could be a path problem, you'll discover that is a path problem <wink>, and
then Mark Hammond will be delighted to explain how it got into that state.
Heh.

if-there's-more-than-one-thing-on-a-search-path-you've-got-at-least-
    twice-as-many-directories-as-you-need-ly y'rs  - tim





More information about the Python-list mailing list