From e3d4651062a17c4ecd96b3e0d962c925297c77d5 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Tue, 23 Apr 2024 22:52:06 +0100 Subject: [PATCH] Add Python main snippet --- snippets/python.snippets | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 snippets/python.snippets diff --git a/snippets/python.snippets b/snippets/python.snippets new file mode 100644 index 0000000..1717812 --- /dev/null +++ b/snippets/python.snippets @@ -0,0 +1,12 @@ +# Python SnipMate snippets + +snippet main + def main(): + ${0:pass} + + + if __name__ == '__main__': + try: + main() + except KeyboardInterrupt: + exit(130)