[Pythonmac-SIG] Exiting/Quitting an applet

Jack Jansen jack@oratrix.nl
Tue, 27 Mar 2001 12:26:28 +0200


> What am I doing wrong with macPython2.0?
[...]
> 	if forkIt != "do it":
> 		sys.exit
> 		print "why does this line print?"

sys.exit is a function, so you should call it:
		sys.exit()
what you do here is simply obtaining the value (and then immedeately 
discarding it again). In Python you always specify the parentheses when you 
call a function.

I think the Python tutorial (on www.python.org) should handle things like this.
--
Jack Jansen             | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.oratrix.nl/~jack    | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm