A
asit
My program contains some sys.exit(1) and when its executed an
exception known as SystemExit is thrown.
I tried to handle bu using following code snippet
if __name__ == "__main__":
try:
main() #main contains sys.exit(1)
except KeyboardInterrupt:
print "aborted by user"
except SystemExit:
pass
But it does not work.
Can anyone help me out ???
Though KeyboradInterrupt is handled, but why SystemExit is not
handles ????
Regards
Asit Dhal
exception known as SystemExit is thrown.
I tried to handle bu using following code snippet
if __name__ == "__main__":
try:
main() #main contains sys.exit(1)
except KeyboardInterrupt:
print "aborted by user"
except SystemExit:
pass
But it does not work.
Can anyone help me out ???
Though KeyboradInterrupt is handled, but why SystemExit is not
handles ????
Regards
Asit Dhal