src/g/d/GDAL-1.7.1/samples/densify.py GDAL(Download)
def construct_parser(self):
from optparse import OptionParser, OptionGroup
usage = "usage: %prog [options] arg"
parser = OptionParser(usage)
g = OptionGroup(parser, "Base options", "Basic Translation Options")
g.add_option("-i", "--input", dest="input",
help="OGR input data source", metavar="INPUT")
parser.add_option_group(g)
if self.opts:
g = OptionGroup(parser, "Special Options", "Special options")
for o in self.opts:
g.add_option(o)
parser.add_option_group(g)
src/p/y/pyserial-HEAD/trunk/pyserial/examples/tcp_serial_redirect.py pyserial(Download)
default = False
)
group = optparse.OptionGroup(parser,
"Serial Port",
"Serial port settings"
)
default = None
)
group = optparse.OptionGroup(parser,
"Network settings",
"Network configuration."
)
default = 7777
)
group = optparse.OptionGroup(parser,
"Newline Settings",
"Convert newlines between network and serial port. Conversion is normally disabled and can be enabled by --convert."
)
src/p/y/pyserial-HEAD/pyserial/examples/tcp_serial_redirect.py pyserial(Download)
default = False
)
group = optparse.OptionGroup(parser,
"Serial Port",
"Serial port settings"
)
default = None
)
group = optparse.OptionGroup(parser,
"Network settings",
"Network configuration."
)
default = 7777
)
group = optparse.OptionGroup(parser,
"Newline Settings",
"Convert newlines between network and serial port. Conversion is normally disabled and can be enabled by --convert."
)
src/p/y/pyserial-2.5/examples/tcp_serial_redirect.py pyserial(Download)
default = False
)
group = optparse.OptionGroup(parser,
"Serial Port",
"Serial port settings"
)
default = None
)
group = optparse.OptionGroup(parser,
"Network settings",
"Network configuration."
)
default = 7777
)
group = optparse.OptionGroup(parser,
"Newline Settings",
"Convert newlines between network and serial port. Conversion is normally disabled and can be enabled by --convert."
)
src/t/w/twitstream-HEAD/examples/fixreplies.py twitstream(Download)
import re
import sys
import htmlentitydefs
from optparse import OptionGroup
try:
import json as simplejson
except ImportError:
parser.add_option('-g', '--pages', help="Number of pages to check (default: 3)", type='int', default=3)
parser.add_option('-m', '--maximum', help="Maximum number of users to track (default/max: 400)", type='int', default=400)
parser.add_option('--growl', help="Send notifications to Growl (Mac only)", action='store_true', dest='growl')
group = OptionGroup(parser, "filters",
"Combining more than one of the user filters takes the "
"intersection of the predicates.")
group.add_option('--friends', help="Limit to friends", action="store_true", dest='friends')
src/c/j/cjklib-0.3/examples/dictionaryspeed.py cjklib(Download)
import imp import sys from timeit import Timer from optparse import OptionParser, OptionGroup, Values from sqlalchemy.sql import text from sqlalchemy.exc import OperationalError
src/b/r/broadwick-1.2.0/examples/messaging/twistedstomp/subscriber.py broadwick(Download)
def main():
from optparse import OptionParser, OptionGroup
parser = OptionParser(usage = 'usage: %prog [options]')
parser.add_option('--verbose', action='store_true', help='log more')
parser.add_option('--login', default='guest', help='STOMP login. default: %default')
parser.add_option('--passcode', default='guest', help='STOMP passcode. default: %default')
src/p/q/pqdl-HEAD/trunk/pqdl.py pqdl(Download)
logger = logging.getLogger('cmdline')
# Using an empty group as help text
grp_prm = optparse.OptionGroup(parser, "Arguments", description=
"""Pass the names of the Pocket Queries you want to download as parameters
(pq_1 pq_2 ...). (case sensitive!) If none given, it will try to download all
of them. You can exlude PQs by adding # on the beginning of the name.
default="pqdl.ini")
# ZIP options
grp_zip = optparse.OptionGroup(parser, "ZIP options",
"""PqDL supports unzipping the Pocket Queries. They will be renamed
automatically after unzipping by this pattern:
Name-of-PQ_1234567_06-12-2010[_waypoints].gpx (-s will be used). Note: if you
default=False, action='store_true')
# Debug and logging options
grp_dbg = optparse.OptionGroup(parser, "Logging options", """They are lots
of debug options. You should always use -d if the program doesn not exactly
does what it's supposed to do, they are lots of interesting debug outputs.
The other debug options are only needed for debugging special problems with
parser.add_option_group(grp_dbg)
# Journal and map file options
grp_journal = optparse.OptionGroup(parser, "Journal and map options",
"""These are special options that will allow PqDL to remember which PQs have
already been downloaded. This is based on the PQ latest generation date, if the
PQ gets generated again, it will be downloaded.
parser.add_option_group(grp_journal)
# GSAK options
grp_map = optparse.OptionGroup(parser,
"GSAK/pqloader file mappings options",
"""This is a feature made for those who use PqDL in conjunction with pqloader.
pqloader will take the first word in a PQs file name to decide in which database
src/p/q/pqdl-HEAD/pqdl.py pqdl(Download)
logger = logging.getLogger('cmdline')
# Using an empty group as help text
grp_prm = optparse.OptionGroup(parser, "Arguments", description=
"""Pass the names of the Pocket Queries you want to download as parameters
(pq_1 pq_2 ...). (case sensitive!) If none given, it will try to download all
of them. You can exlude PQs by adding # on the beginning of the name.
default="pqdl.ini")
# ZIP options
grp_zip = optparse.OptionGroup(parser, "ZIP options",
"""PqDL supports unzipping the Pocket Queries. They will be renamed
automatically after unzipping by this pattern:
Name-of-PQ_1234567_06-12-2010[_waypoints].gpx (-s will be used). Note: if you
default=False, action='store_true')
# Debug and logging options
grp_dbg = optparse.OptionGroup(parser, "Logging options", """They are lots
of debug options. You should always use -d if the program doesn not exactly
does what it's supposed to do, they are lots of interesting debug outputs.
The other debug options are only needed for debugging special problems with
parser.add_option_group(grp_dbg)
# Journal and map file options
grp_journal = optparse.OptionGroup(parser, "Journal and map options",
"""These are special options that will allow PqDL to remember which PQs have
already been downloaded. This is based on the PQ latest generation date, if the
PQ gets generated again, it will be downloaded.
parser.add_option_group(grp_journal)
# GSAK options
grp_map = optparse.OptionGroup(parser,
"GSAK/pqloader file mappings options",
"""This is a feature made for those who use PqDL in conjunction with pqloader.
pqloader will take the first word in a PQs file name to decide in which database
src/f/w/fwrap-0.1.1/fwrap/fparser/script_options.py fwrap(Download)
__all__ = ['set_read_options', 'set_parse_options',
'get_fortran_code_group']
from optparse import OptionGroup, NO_DEFAULT
def set_read_options(parser):
parser.set_usage('''\
def get_fortran_code_group(parser):
group = OptionGroup (parser, 'Fortran code options',
description = 'Specify information about Fortran codes.')
group.add_option('--mode',
default = 'auto',
choices = ['auto', 'free', 'fix', 'f77', 'pyf'],
help = 'Specify Fortran code mode. Default: %default.'
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 Next