1

I am creating a program that would be a lot simpler to write if I could just end the program if something happened. However, whenever I use sys.exit(), that gives an error message, and I want a way to exit that doesn't show a message or anything. I just want a clean exit. If you know of anything I can use for this, please tell me.

default locale
  • 13,035
  • 13
  • 56
  • 62
HAL 9000
  • 61
  • 1
  • 6

1 Answers1

4

Take a look on this: Here (look at os._exit)

Sys.exit(0) means 'All is good' but if you have an error you should still exit with 1.

Community
  • 1
  • 1
Cob013
  • 1,057
  • 9
  • 22