trepan/client.py
def process_options(pkg_version, sys_argv, option_list=None):
    """Handle debugger options. Set `option_list' if you are writing
    another main program and want to extend the existing set of debugger
    options.

    The options dicionary from opt_parser is return. sys_argv is
    also updated."""
    usage_str="""%prog [debugger-options]]

    Client connection to an out-of-process trepan3k debugger session"""

    # serverChoices = ('TCP','FIFO', None) # we use PID for now.

    optparser = OptionParser(usage=usage_str, option_list=option_list,
                             version="%%prog version %s" % pkg_version)

    optparser.add_option("-H", "--host", dest="host", default='127.0.0.1',
                         action="store", type='string', metavar='IP-OR-HOST',
                         help="connect IP or host name.")
    optparser.add_option("-P", "--port", dest="port", default=1027,
                         action="store", type='int', metavar='NUMBER',
                         help="Use TCP port number NUMBER for "
                         "out-of-process connections.")
    optparser.add_option("--pid", dest="pid", default=0,
                         action="store", type='int', metavar='NUMBER',
                         help="Use PID to get FIFO names for "
                         "out-of-process connections.")

    optparser.disable_interspersed_args()

    sys.argv = list(sys_argv)
    (opts, sys.argv) = optparser.parse_args()
    return opts, sys.argv
def process_options(pkg_version, sys_argv, option_list=None):
    """Handle debugger options. Set `option_list' if you are writing
    another main program and want to extend the existing set of debugger
    options.

    The options dicionary from opt_parser is return. sys_argv is
    also updated."""
    usage_str="""%prog [debugger-options]]

    Client connection to an out-of-process trepan3k debugger session"""

    # serverChoices = ('TCP','FIFO', None) # we use PID for now.

    optparser = OptionParser(usage=usage_str, option_list=option_list,
                             version="%%prog version %s" % pkg_version)

    optparser.add_option("-H", "--host", dest="host", default='127.0.0.1',
                         action="store", type='string', metavar='IP-OR-HOST',
                         help="connect IP or host name.")
    optparser.add_option("-P", "--port", dest="port", default=1027,
                         action="store", type='int', metavar='NUMBER',
                         help="Use TCP port number NUMBER for "
                         "out-of-process connections.")
    optparser.add_option("--pid", dest="pid", default=0,
                         action="store", type='int', metavar='NUMBER',
                         help="Use PID to get FIFO names for "
                         "out-of-process connections.")

    optparser.disable_interspersed_args()

    sys.argv = list(sys_argv)
    (opts, sys.argv) = optparser.parse_args()
    return opts, sys.argv
Handle debugger options. Set `option_list' if you are writing
    another main program and want to extend the existing set of debugger
    options.

    The options dicionary from opt_parser is return. sys_argv is
    also updated.