30 Sep
2009
30 Sep
'09
4:21 a.m.
Greg Ewing wrote:
Paul Moore wrote:
I'd rather argparse (or any library function) didn't call sys.exit on my behalf - it should raise an exception.
Actually, sys.exit() *does* raise an exception (i.e. SystemExit) that you can catch if you want.
I was going to mention that. Between catching SystemExit, the '-i' switch to the interpeter and the PYTHONINSPECT environment variable, investigating applications that call sys.exit isn't *that* difficult. It's a far cry from the instant exits of a C level abort call. Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia ---------------------------------------------------------------