Replaced time module with my own on accident - help
carribeiro at gmail.com
Wed Oct 20 21:06:44 CEST 2004
On Wed, 20 Oct 2004 11:49:58 -0700, Sean Berry <sean at buildingonline.com> wrote:
> I was writing a little script to test different functions of the time
> module. Like an idiot, I named the test script time.py.
> Then when I tried to do a "import time" call, I got an error.
> So, my time.py has overwritten the time.py 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) time.py module
is just getting the precedence over the standard one. If that's the
case, just removing your own time.py (or renaming it) should solve
Consultoria em Projetos
mail: carribeiro at gmail.com
mail: carribeiro at yahoo.com
More information about the Python-list