I am a elative new comer to python. I wrote the following test snippet.
#!/usr/bin/env python
def main (): play_test()
def play_test (): print "Hi! -- in play test"
When I do "python test.py" absolutely nothing happens.
Correct.
I expect it to do the print statement. Thanks in advance for your help.
You defined functions, but not the main code of the program, therefore it does nothing.
Appended to your program, you need this:
### This defines where the actual program starts...
if __name__ == '__main__':
main()
### Now the program is done. ;-)
Hope this Helps! Roger "Merch" Merchberger
-- Roger "Merch" Merchberger | Anarchy doesn't scale well. -- Me [EMAIL PROTECTED] | SysAdmin, Iceberg Computers
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor