Skip to content

Instantly share code, notes, and snippets.

@jacob-ogre
Last active December 17, 2015 14:59
Show Gist options
  • Save jacob-ogre/5628851 to your computer and use it in GitHub Desktop.
Save jacob-ogre/5628851 to your computer and use it in GitHub Desktop.
Python: if len(sys.argv) != N A vim-snippet for exiting if the number of command-line arguments is incorrect.
snippet iflen
if len(sys.argv) != ${1:N}:
print main.__doc__
sys.exit()
${2}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment