I am trying to exit a python script without the annoying error message coming up:
Traceback (most recent call last):
File "<pyshell#27>", line 3, in <module>
sys.exit()
SystemExit
I have tried quite a few things, but none have worked. Here's an example:
while True:
print "hi", #this just tests to see if I have exited.
try:
sys.exit()
except SystemExit:
print "Exited"
NB: The solution doesn't have to be anywhere close to this code, that was just an example of something I have tried