does python have a halt statement?

fredrik at fredrik at
Thu Nov 16 13:02:14 CET 2000

stevecanfield at wrote:
> I'm just getting started writing my first non-toy python program
> and I am stumped immediately by an embarassingly simple problem-
> how to I halt execution?


(or if you prefer, raise SystemExit)

> And why isn't return legal here?  Am I not in an
> fucntion implicitly named __main__?

you're executing code in a module named __main__, but
a module namespace isn't the same thing as a function.
for some more info, see the section called "What Does
Python Do to Import a Module?" in this mini guide:


Sent via
Before you buy.

More information about the Python-list mailing list