Skip to content

Latest commit

 

History

History
43 lines (36 loc) · 849 Bytes

outline.md

File metadata and controls

43 lines (36 loc) · 849 Bytes

Command Line Python


Made Up Of

  • Python is very good for command-line programs
    • It's already installed, probably
      • You probably have an old version though
      • Quick start-up
      • Low memory requirements
  • Command-Line Arguments
    • Options:
      • getopt, optparse, argparse
    • Don't use getopt
    • Use argparse
    • or compago
  • Input
    • stdin
    • getpass
  • Output (Stdout, Stderr)
    • Using print
      • Formatting operator vs str.format
    • Colour

TODO

  • click, cliff

  • Error-handling

    • Catch exceptions properly!
    • Catch KeyboardInterrupt!
  • Signals from the OS

    • Handling signals from the OS
    • Making sure your main thread is not blocking
  • Distribution

    • distutils, setuptools
    • platform-specific packaging
    • run your own PyPI
  • Interactive command-line programs

  • Configuration

  • Exit Codes