assist/command/mkmodel.py
def add_parser(subp, raw):
    """Add a parser to the main subparser. """
    tmpp = subp.add_parser('mkmodel', help='create a model file',
                           formatter_class=raw,
                           description=textwrap.dedent(DESC))
    tmpp.add_argument('model', type=str, metavar='MODELNAME',
                      help='name of the model')
    tmpp.add_argument('type', type=str, choices=['ssa', 'sde'],
                      help='model type')
    tmpp.add_argument('--nspecs', type=positive_type,
                      help='number of species')
    tmpp.add_argument('--nreacs', type=positive_type,
                      help='number of reactions')
    tmpp.add_argument('--dim', type=positive_type,
                      help='dimension of phase space')
    tmpp.add_argument('-z', type=str, choices=['row', 'col'],
                      help='state change matrix format')
Add a parser to the main subparser. 
Add a parser to the main subparser.
Add a parser to the main subparser .
def add_parser(subp, raw):
    tmpp = subp.add_parser('mkmodel', help='create a model file',
                           formatter_class=raw,
                           description=textwrap.dedent(DESC))
    tmpp.add_argument('model', type=str, metavar='MODELNAME',
                      help='name of the model')
    tmpp.add_argument('type', type=str, choices=['ssa', 'sde'],
                      help='model type')
    tmpp.add_argument('--nspecs', type=positive_type,
                      help='number of species')
    tmpp.add_argument('--nreacs', type=positive_type,
                      help='number of reactions')
    tmpp.add_argument('--dim', type=positive_type,
                      help='dimension of phase space')
    tmpp.add_argument('-z', type=str, choices=['row', 'col'],
                      help='state change matrix format')
def add_parser ( subp , raw ) : tmpp = subp . add_parser ( 'mkmodel' , help = 'create a model file' , formatter_class = raw , description = textwrap . dedent ( DESC ) ) tmpp . add_argument ( 'model' , type = str , metavar = 'MODELNAME' , help = 'name of the model' ) tmpp . add_argument ( 'type' , type = str , choices = [ 'ssa' , 'sde' ] , help = 'model type' ) tmpp . add_argument ( '--nspecs' , type = positive_type , help = 'number of species' ) tmpp . add_argument ( '--nreacs' , type = positive_type , help = 'number of reactions' ) tmpp . add_argument ( '--dim' , type = positive_type , help = 'dimension of phase space' ) tmpp . add_argument ( '-z' , type = str , choices = [ 'row' , 'col' ] , help = 'state change matrix format' )
Add a parser to the main subparser.
Add a parser to the main subparser .
"""Add a parser to the main subparser. """
subp
raw