Package obitools :: Package options
[hide private]
[frames] | no frames]

Package options

source code

Module providing high level functions to manage command line options.

Submodules [hide private]

Functions [hide private]
 
getOptionManager(optionDefinitions, entryIterator=None)
Build an option manager fonction.
source code
 
currentInputFileName() source code
 
currentInputFile() source code
 
currentFileSize() source code
 
currentFileTell() source code
 
allEntryIterator(files, entryIterator) source code
Variables [hide private]
  _currentInputFileName = None
hash(x)
  _currentFile = None
hash(x)
  _currentFileSize = None
hash(x)
  __package__ = 'obitools.options'

Imports: logging, sys, debug, OptionParser, universalOpen, fileSize, universalTell


Function Details [hide private]

getOptionManager(optionDefinitions, entryIterator=None)

source code 

Build an option manager fonction. that is able to parse command line options of the script.

Parameters:
  • optionDefinitions (list of functions.) - list of function describing a set of options. Each function must allows as unique parametter an instance of OptionParser.
  • entryIterator (an iterator generator function with only one parametter of type file) - an iterator generator function returning entries from the data files.