Replaced time module with my own on accident - help

Carlos Ribeiro carribeiro at
Wed Oct 20 21:06:44 CEST 2004

On Wed, 20 Oct 2004 11:49:58 -0700, Sean Berry <sean at> wrote:
> I was writing a little script to test different functions of the time
> module.  Like an idiot, I named the test script
> Then when I tried to do a "import time" call, I got an error.
> So, my has overwritten the builtin mod.

Your problem may be a little bit simpler to solve. When you do a
'import time' is looks first in the current directory; if it doesn't
find a module by that name, it searches the module path (I forgot the
name), which usually on Unix points to the lib subdirectory of your
Python installation. It appears that you own (broken) module
is just getting the precedence over the standard one. If that's the
case, just removing your own (or renaming it) should solve
your problem.

Carlos Ribeiro
Consultoria em Projetos
mail: carribeiro at
mail: carribeiro at

More information about the Python-list mailing list