diff options
Diffstat (limited to 'snippets/python-mode/try-argv')
-rw-r--r-- | snippets/python-mode/try-argv | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/snippets/python-mode/try-argv b/snippets/python-mode/try-argv new file mode 100644 index 0000000..5b515ad --- /dev/null +++ b/snippets/python-mode/try-argv @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: try argv +# key: targv +# -- +try: + _, $1 = sys.argv +except ValueError: + sys.exit(__doc__) + +$0
\ No newline at end of file |