def set_convert_options(parser):
    set_formatter(parser)
    if os.name == 'posix':
        try:
            import matplotlib
            matplotlib.use('GTkAgg')
            parser.run_methods = ['subcommand']
        except __HOLE__:
            pass
    parser.set_usage ('%prog [options] -i INPUTPATH [-o OUTPUTPATH]')
    parser.set_description('Convert INPUTPATH to OUTPUTPATH.')
    parser.add_option ('--input-path', '-i',
                       type = 'file' if have_wx else str, metavar='INPUTPATH',
                       help = 'Specify INPUTPATH.'
                       )
    parser.add_option ('--output-path', '-o',
                       type = 'file' if have_wx else str, metavar='OUTPUTPATH',
                       help = 'Specify OUTPUTPATH.'
                       )
    parser.add_option ('--compression',
                       type = 'choice', default='none',
                       choices = ['none', 'lzw'],
                       help = 'Specify compression.'
                       )
    parser.add_option ('--slice',
                       type = 'string',
                       help = 'Specify slice using form "<zstart>:<zend>,<ystart>:<yend>,<xstart>:<xend>"'
                       )
dataset/ETHPy150Open pearu/pylibtiff/libtiff/script_options.py/set_convert_options