[Python-ideas] relaxing keyword usage restrictions

Georg Brandl g.brandl at gmx.net
Fri Sep 9 19:28:55 CEST 2011


Am 09.09.2011 10:21, schrieb Chris Rebert:
> On Fri, Sep 9, 2011 at 1:18 AM, H Krishnan <hetchkay at gmail.com> wrote:
> <snip>
>> If I do:
>> __builtins__.exit = os._exit = os.kill = sys.exit = lambda *args: False
>> is there a way to programmatically exit?
> 
> Yes: raise SystemExit

Or reload(sys); sys.exit()

Georg




More information about the Python-ideas mailing list