If you just want to stop it from exiting (but still want the error
messages), override the exit method:
class MyParser(ArgumentParser):
def exit(self, status=0, message=None):
# do whatever you want here
This approach should probably be described in the argparse
documentation. Feel free to file a documentation feature request on
bugs.python.org.
Steve
--
Where did you get that preposterous hypothesis?
Did Steve tell you that?
--- The Hiphopopotamus