[Tutor] What am I doing wrong...

John Purser johnp at milwaukielumber.com
Thu Dec 23 18:50:41 CET 2004


The basic problem is you never told Python to DO anything except define what
it would do if anyone asked it to.  If you add the line "main()" to the
bottom you'll get your message printed.

I'm not sure if this is your code or my mail agent (outlook) but as you can
see below there's a space between the function name (main) and the
parenthesis.  I don't believe that's supposed to be there.

Good Luck.

John Purser 

-----Original Message-----
From: tutor-bounces at python.org [mailto:tutor-bounces at python.org] On Behalf
Of Ken Stevens
Sent: Thursday, December 23, 2004 09:33
To: tutor at python.org
Subject: [Tutor] What am I doing wrong...

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. 

I expect it to do the print statement.

Thanks in advance for your help.

Ken



-- 
The horizon of many people is a circle with a radius of zero. They call 
this their point of view.
		-- Albert Einstein
_______________________________________________
Tutor maillist  -  Tutor at python.org
http://mail.python.org/mailman/listinfo/tutor



More information about the Tutor mailing list