I'm not sure if this is an appropriate question for stack overflow... If not please guide me in the right direction.
My question is this:
If a programe expects a user to press ctrl-c
to close/interrupt said program and return the user to there shell and the programe does this by handling the KeyboardInterupt
by calling sys.exit(code)
what should code
be. I think said program should call sys.exit(0)
because it was antisapatin the user of said programme to eventually mash ctrl-c
to close the programe, not because of it hanging or crashing but because its know longer needed.
Aucun commentaire:
Enregistrer un commentaire