Package pology :: Module stdcmdopt

Module stdcmdopt

Standard command line options.

This module defines command lines options frequently used by various scripts, in a form suitable for adding to their option lists.

All functions in this module take an optparse.OptionParser instance, possibly followed by some optional parameters, and return None.


Author: Chusslove Illich (Часлав Илић) <caslav.ilic@gmx.net>

License: GPLv3

Functions
 
add_cmdopt_incexc(opars, ormatch=False)
Regular expressions to include and exclude files and directories by matching names and paths.
 
add_cmdopt_filesfrom(opars, cmnts=True, incexc=True)
File paths from which to collect list of file and directory paths.
 
add_cmdopt_colors(opars)
Options for syntax coloring in output.
 
add_cmdopt_wrapping(opars)
Options for wrapping in catalogs when writing them out.
Variables
  __package__ = 'pology'
Function Details

add_cmdopt_incexc(opars, ormatch=False)

 

Regular expressions to include and exclude files and directories by matching names and paths.

Parameters:
  • ormatch (bool) - whether multiple expressions are linked by OR operation

add_cmdopt_filesfrom(opars, cmnts=True, incexc=True)

 

File paths from which to collect list of file and directory paths.

If cmnts is set to True, lines can be comments. If incexc is set to True, lines can be inclusion and exclusion directives.

Parameters:
  • cmnts (bool) - whether to enable comments
  • incexc (bool) - whether to enable inclusion/exclusion regexes