I've seen people suggesting sys.exit() in Python. My question is that, is there any other way to exit the execution of current script, I mean termination, with an error.
Something like this:
sys.exit("You can not have three process at the same time.")
Currently my solution would be:
print("You can not have three process at the same time.")
sys.exit()
sys.stderrinstead:print('You can not have three processes at the same time.', file=sys.stderr), and usesys.exit(1)to indicate an error exit code. - Martijn Pieters