python: can't open file 'timeit.py'

Aggelos I. Orfanakos aorfanakos at gmail.com
Fri Jan 28 09:17:38 EST 2005


Hello.
Under Gentoo Linux, I issue:

$ python timeit.py
python: can't open file 'timeit.py'
$ ls -al /usr/lib/python2.3/timeit.py
-rw-r--r--  1 root root 9833 Oct 19 02:17 /usr/lib/python2.3/timeit.py

But if I specify the full path, it works:

$ python /usr/lib/python2.3/timeit.py -n 1 "pass"
1 loops, best of 3: 3.1 usec per loop

Any ideas how can I fix this? I think it may have to do with where
Python looks for modules, but I am not sure.

Thanks in advance.




More information about the Python-list mailing list