def getHelpStr(description, arguments):
    
    LEFT_COL_PADDING=25
    WRAP_SIZE = 50

    ostring = description + "\n\n"

    #descriptions can span multiple rows,
    #the first row contains the argument name
    #the next just and empty string
    def once(param, times=0):
        while True:
            if times == 0:
                times += 1
                yield param
            else:
                yield ""

    #add an empty string to the beginning of multiline descriptions
    #that are returned by 'wrap'
    wrap_s = WRAP_SIZE
    d =  reduce( add, map(lambda x: zip(once("-"+x.name),
                                        wrap(x.description, wrap_s)),arguments))

    pad = LEFT_COL_PADDING
    ostring += "\n".join(map(lambda (left,right): "".join((left.ljust(pad),right)), d))
    
    return ostring
Merge new exceptions with existing exceptions
dataset/ETHPy150Open jgurtowski/ectools/args.py/getHelpStr--crossover with--dataset/ETHPy150Open neurodata/ndstore/ocpca/ocpcadb.py/OCPCADB.updateExceptions