Stop python

Remco Gerlich scarblac at pino.selwerd.nl
Mon Apr 16 19:31:33 EDT 2001


Dave LeBlanc <whisper at oz.net> wrote in comp.lang.python:
> How would this terminate the parsing of a Python program (as opposed
> to execution)?

You're right, it doesn't stop that.

"""
What do you need it for? You could put the rest of the file between triple
quotes so that it's just a string to the parser.

Or you could put the rest after 
if __debug__:
   And use python -O to ignore this part (at least, I think it's supposed
   to ignore even syntax errors).
   
Otherwise, no way.

-- 
Remco Gerlich
"""



More information about the Python-list mailing list