471,090 Members | 1,322 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,090 software developers and data experts.

localtime import not working

udo:/usr/lib/cgi-bin# python
Python 2.3.4 (#2, Jul 28 2004, 09:39:34)
[GCC 3.3.4 (Debian 1:3.3.4-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
from time import localtime Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/cgi-bin/time.py", line 3, in ?
NameError: name 'localtime' is not defined

What can i do?
Jul 18 '05 #1
1 1974
Don't give your script the same name as a built-in module, or don't give
your script a .py extension.

Be sure to remove the .pyc version of your file too, or that will be found
intstead of the real time module, even after your time.py is removed.

This is probably in the faq...


Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFBSNxQJd01MZaTXX0RAj3vAJ9h9mL0ja8DczqeqXgFvx lVGwTUmgCfaPzp

Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Dariusz | last post: by
2 posts views Thread by Raskolnikow | last post: by
5 posts views Thread by Raj | last post: by
1 post views Thread by OleMacGeezer | last post: by
16 posts views Thread by maruk2 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.