wieso geht das nicht!?!?!?!?
Verfasst: Donnerstag 11. Dezember 2003, 19:52
hallo zusammen!
folgendes skript funktioniert einwandfrei, wenn ich es im idle starte, aber nicht wenn ich es per ./uhrzeit.py von der konsole aufrufe, natürlich auch nicht mit pyhton uhrzeit.py
zuerst das skript:
nun die fehlermeldung:
Traceback (most recent call last):
File "./uhrzeit.py", line 3, in ?
from time import*
File "/home/rolgal/polen/python/time.py", line 4, in ?
z=localtime()
NameError: name 'localtime' is not defined
WARUM DENN?
vielen dank im voraus
folgendes skript funktioniert einwandfrei, wenn ich es im idle starte, aber nicht wenn ich es per ./uhrzeit.py von der konsole aufrufe, natürlich auch nicht mit pyhton uhrzeit.py
zuerst das skript:
Code: Alles auswählen
#!/usr/local/bin/python
from time import*
z=localtime()
print "Content-Type: text/html"
print
print "<html> <body>"
print "Uhrzeit: ", z[3], z[4]
print "</body></html>"
Traceback (most recent call last):
File "./uhrzeit.py", line 3, in ?
from time import*
File "/home/rolgal/polen/python/time.py", line 4, in ?
z=localtime()
NameError: name 'localtime' is not defined
WARUM DENN?
vielen dank im voraus