kmcminn / perfect-script-python

clean python script template

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Perfect Script (python)

a clean python script template

Notes

  • argparse > optparse
  • subprocess.check_output > *
  • return int from main() slightly more dry than multiple sys.exits from main()
  • returning a parser instance seems more reusable than running parse_args from the function
  • classes not needed in python for easy reuse
  • do clunky script stuff in main(), option conditionals

Todo

  • python3

About

clean python script template

License:ISC License


Languages

Language:Python 100.0%