Open hfculver opened 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:
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!'
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.)
Agreed, this is a bug. This used to work.
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.)