[Tutor] bug hunting again
alan.gauld@bt.com
alan.gauld@bt.com
Mon, 8 Jul 2002 17:50:25 +0100
A quick look suggests you don't actually start the
program anywhere in your file.
How are you trying to run it?
> been working on (from my last few messages). Something is
> stopping the program from running
What actually happens? Do you get any errors?
Either from DOS, Windows or Python?
> Please tell me if you can find what is stopping the program from
> running. Thank you.
Assuming you want it to run by double clicking the file icon
you will need something like:
if __name__ == "__main":
hour()
If you are importing it into IDLE(say) then you should
get something back when you type time.hour()
BUT as somebody already pointed out naming things the same
as python module names is a bad idea. When you import
your time module you will hide the python time module.
Rename your file to hourtracker.py or something...
Slightly confused and needing more info
Alan G