I am working on a command shell with the python cmd class and I'm trying to mimic the behavior of the unix kill
command. I want to be able to type kill -<signum> <pid>
and have argument parser take the -<signum>
and store it away. I can't seem to figure out how to do this with ArgumentParser since it seems to want to have all of the flags specified ahead of time and that doesn't seem reasonable with the number of signals there are.
Does anyone have any experience with this and if so how do I go about doing it?