Mainly notes to future-Twig (and for anyone else who may find them useful)
To terminate or stop a Python script, use:
import sys sys.exit()
[ Source ]