My 'time' module is broken, unsure of cause

darren kirby bulliver at badcomputer.org
Thu Aug 23 19:36:31 CEST 2007


quoth the   Calderone:

>
>     exarkun at charm:~$ echo "print '40:42:0'" > time.py
>     exarkun at charm:~$ python
>     Python 2.4.3 (#2, Oct  6 2006, 07:52:30)
>     [GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2
>     Type "help", "copyright", "credits" or "license" for more information.
>
>     >>> import time
>
>     40:42:0
>
>     >>> time.time()
>
>     Traceback (most recent call last):
>       File "<stdin>", line 1, in ?
>     AttributeError: 'module' object has no attribute 'time'
>
>     >>> print time.__file__
>
>     time.py
>
>     >>> ^D
>
>     exarkun at charm:~$ rm time.py
>     exarkun at charm:~$ rm time.pyc
>     exarkun at charm:~$ python
>     Python 2.4.3 (#2, Oct  6 2006, 07:52:30)
>     [GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2
>     Type "help", "copyright", "credits" or "license" for more information.
>
>     >>> import time
>     >>> time.time()
>
>     1187890226.9293921
>
>     >>> print time.__file__
>
>     /usr/lib/python2.4/lib-dynload/time.so
>
>
> Jean-Paul

Ahh, so it was pebkac. Thanks Jean-Paul, I can be thick sometimes...

-d
-- 
darren kirby :: Part of the problem since 1976 :: http://badcomputer.org
"...the number of UNIX installations has grown to 10, with more expected..."
- Dennis Ritchie and Ken Thompson, June 1972



More information about the Python-list mailing list