Package wtf :: Module cmdline
[hide private]
[frames] | no frames]

Module cmdline

source code

This modules handles commandline parsing and initial bootstrapping.


Author: André Malo

Classes [hide private]
  CommandlineError
Error on command line
  _OptionParser
Extended option parser for better behaviour
Functions [hide private]
int
terminal_width()
Return terminal width if determined, None otherwise
source code
tuple
parse(*opts)
Parse command line
source code
 
run()
Main command line runner
source code
Variables [hide private]
  __package__ = 'wtf'
Function Details [hide private]

terminal_width()

source code 
Return terminal width if determined, None otherwise
Returns: int
The width

parse(*opts)

source code 
Parse command line
Parameters:
  • opts (tuple) - Option spec (WRITEME: need more info here :-) (({key: value, ...}, ...)) Special keys are '' and 'ENV'.
Returns: tuple
The option container and the fixed args ((optparse.OptionContainer, list))