yhat / rodeo

A data science IDE for Python
Other
3.92k stars 410 forks source link

quit() and sys.exit() not working when script runs #569

Open hfculver opened 7 years ago

hfculver commented 7 years ago

Trying to do incremental code debug, using quit(), or equivalent. When I run the script, I get "Unable to execute". Sample code is as follows:

begin script...

import argparse import sys sys.argv=['argp_1.py','magic.name']

print sys.argv quit('DEBUG: early exit.') sys.exit('Stop, aready!')

parser = argparse.ArgumentParser() parser.add_argument("a") args = parser.parse_args()

if args.a == 'magic.name': print 'You nailed it!'

end of script.

I want to be able to have the python script stop at any point. How do I accomplish this? (without going to CLI and running the code with the python interpreter there.)

TakenPilot commented 7 years ago

Agreed, this is a bug. This used to work.