• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email

All Samples(134)  |  Call(27)  |  Derive(54)  |  Import(53)
Format help with indented section bodies.
    

src/c/e/cement-HEAD/cement/core/opt.py   cement(Download)
"""Cement methods and classes to handle cli option/arg parsing."""
 
import sys, os
from optparse import OptionParser, IndentedHelpFormatter, OptionConflictError
 
from cement import namespaces
from cement.core.log import get_logger
 
    """
    fmt = IndentedHelpFormatter(
            indent_increment=4, max_help_position=32, width=77, short_first=1
            )
    parser = OptionParser(formatter=fmt, version=banner)
    return parser

src/u/n/underpin-HEAD/trunk/var/lib/underpin/data/templates/Default/trunk/bin/_uvar_Name.py   underpin(Download)
import sys,os ; sys.path.insert(0, './lib')
import _uvar_Name
from optparse import OptionParser 
from optparse import IndentedHelpFormatter
from ConfigParser import *
from _uvar_Name import base
 
def get_cli_opts():
    fmt     = IndentedHelpFormatter(indent_increment=4,max_help_position=32, width=80, short_first=1)
    parser  = OptionParser(version=_uvar_Name.get_version_banner(), formatter=fmt)
    parser.usage = """
    plsearch (command) --[options] args...
 
Commands: 

src/u/n/underpin-HEAD/var/lib/underpin/data/templates/Default/trunk/bin/_uvar_Name.py   underpin(Download)
import sys,os ; sys.path.insert(0, './lib')
import _uvar_Name
from optparse import OptionParser 
from optparse import IndentedHelpFormatter
from ConfigParser import *
from _uvar_Name import base
 
def get_cli_opts():
    fmt     = IndentedHelpFormatter(indent_increment=4,max_help_position=32, width=80, short_first=1)
    parser  = OptionParser(version=_uvar_Name.get_version_banner(), formatter=fmt)
    parser.usage = """
    plsearch (command) --[options] args...
 
Commands: 

src/p/a/pascut-0.1.1/pascut/commands.py   pascut(Download)
import pascut
from optparse import IndentedHelpFormatter, OptionParser
import sys
from os import path
 
"""
Usage: $ pascut HelloWrold.as
def parse_args(args):
    parser = OptionParser(formatter=IndentedHelpFormatter(
        max_help_position=60, width=200))
    parser.add_option('-b', '--bind-address', dest='addr',
            default='0.0.0.0', help='server bind address(default 0.0.0.0)')
    parser.add_option('-c', '--compile-config', dest='compile_config',
            default='', help='mxmlc compile config ex:) --compile-config="-benchmark -strict=true"')

src/s/c/ScriptUtils-0.8.0/scriptutils/options.py   ScriptUtils(Download)
from optparse import OptionParser, OptionGroup, IndentedHelpFormatter
 
class Options(object, OptionParser):
 
    def __init__(self, usage=None, args=None, width=None):
        if not usage: usage = 'Usage: %prog [options]'
        if args: usage += ' %s' % args.strip()
        if not width: width = 45
        object.__init__(self)
        OptionParser.__init__(self, usage, add_help_option=None, formatter=IndentedHelpFormatter(max_help_position=width))

src/m/o/moofs-HEAD/moofs/src/fuseparts/subbedopts.py   moofs(Download)
#
 
from optparse import Option, OptionParser, OptParseError, OptionConflictError
from optparse import HelpFormatter, IndentedHelpFormatter, SUPPRESS_HELP
from fuseparts.setcompatwrap import set
 
##########
class SubbedOptIndentedFormatter(IndentedHelpFormatter, SubbedOptFormatter):
 
    def format_option_strings(self, option):
        return SubbedOptFormatter.format_option_strings(self, option)
 
 
 

src/a/l/allmydata-tahoe-1.8.0/mac/fuseparts/subbedopts.py   allmydata-tahoe(Download)
#
 
from optparse import Option, OptionParser, OptParseError, OptionConflictError
from optparse import HelpFormatter, IndentedHelpFormatter, SUPPRESS_HELP
from fuseparts.setcompatwrap import set
 
##########
class SubbedOptIndentedFormatter(IndentedHelpFormatter, SubbedOptFormatter):
 
    def format_option_strings(self, option):
        return SubbedOptFormatter.format_option_strings(self, option)
 
 
 

src/f/u/fuse-python-0.2/fuseparts/subbedopts.py   fuse-python(Download)
#
 
from optparse import Option, OptionParser, OptParseError, OptionConflictError
from optparse import HelpFormatter, IndentedHelpFormatter, SUPPRESS_HELP
from fuseparts.setcompatwrap import set
 
##########
class SubbedOptIndentedFormatter(IndentedHelpFormatter, SubbedOptFormatter):
 
    def format_option_strings(self, option):
        return SubbedOptFormatter.format_option_strings(self, option)
 
 
 

src/s/a/sadic-HEAD/trunk/sadic/cmdline.py   sadic(Download)
from os.path import split, splitext
from urlparse import urlsplit
from sets import Set
from optparse import OptionParser, OptionGroup, OptionValueError, \
    IndentedHelpFormatter
 
import consts
class MyFormatter(IndentedHelpFormatter):
    """Formatter with a different style for options."""
    def format_option_strings (self, option):
        """Return a comma-separated list of option strings & metavariables."""
        if option.takes_value() or option.action == 'callback':
            metavar = option.metavar or option.dest.upper()
            short_opts = [sopt + " " + metavar for sopt in option._short_opts]
class XmlStripFormatter(IndentedHelpFormatter):
    """Formatter that strips xml tags from help.
 
    Strip the tag from:
      * OptionContainer.description
      * Option.metavar
      * Option.help

src/s/a/sadic-HEAD/sadic/cmdline.py   sadic(Download)
from os.path import split, splitext
from urlparse import urlsplit
from sets import Set
from optparse import OptionParser, OptionGroup, OptionValueError, \
    IndentedHelpFormatter
 
import consts
class MyFormatter(IndentedHelpFormatter):
    """Formatter with a different style for options."""
    def format_option_strings (self, option):
        """Return a comma-separated list of option strings & metavariables."""
        if option.takes_value() or option.action == 'callback':
            metavar = option.metavar or option.dest.upper()
            short_opts = [sopt + " " + metavar for sopt in option._short_opts]
class XmlStripFormatter(IndentedHelpFormatter):
    """Formatter that strips xml tags from help.
 
    Strip the tag from:
      * OptionContainer.description
      * Option.metavar
      * Option.help

  1 | 2 | 3 | 4 | 5 | 6  Next