trepan/bwcli.py
def process_options(debugger_name, 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] [python-script [script-options...]]

       Runs the extended python debugger"""

    # serverChoices = ('TCP','FIFO', None)

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

    optparser.add_option("-F", "--fntrace", dest="fntrace",
                         action="store_true", default=False,
                         help="Show functions before executing them. " +
                         "This option also sets --batch")
    optparser.add_option("--basename", dest="basename",
                         action="store_true", default=False,
                         help="Filenames strip off basename, "
                         "(e.g. for regression tests)")
    optparser.add_option("--different", dest="different",
                         action="store_true", default=True,
                         help="Consecutive stops should have different "
                         "positions")
    optparser.disable_interspersed_args()

    sys.argv = list(sys_argv)
    (opts, sys.argv) = optparser.parse_args()
    dbg_opts = {}

    return opts, dbg_opts, sys.argv
def process_options(debugger_name, 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] [python-script [script-options...]]

       Runs the extended python debugger"""

    # serverChoices = ('TCP','FIFO', None)

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

    optparser.add_option("-F", "--fntrace", dest="fntrace",
                         action="store_true", default=False,
                         help="Show functions before executing them. " +
                         "This option also sets --batch")
    optparser.add_option("--basename", dest="basename",
                         action="store_true", default=False,
                         help="Filenames strip off basename, "
                         "(e.g. for regression tests)")
    optparser.add_option("--different", dest="different",
                         action="store_true", default=True,
                         help="Consecutive stops should have different "
                         "positions")
    optparser.disable_interspersed_args()

    sys.argv = list(sys_argv)
    (opts, sys.argv) = optparser.parse_args()
    dbg_opts = {}

    return opts, dbg_opts, sys.argv
def process_options ( debugger_name , pkg_version , sys_argv , option_list = None ) : usage_str = """%prog [debugger-options] [python-script [script-options...]]

       Runs the extended python debugger""" # serverChoices = ('TCP','FIFO', None) optparser = OptionParser ( usage = usage_str , option_list = option_list , version = "%%prog version %s" % pkg_version ) optparser . add_option ( "-F" , "--fntrace" , dest = "fntrace" , action = "store_true" , default = False , help = "Show functions before executing them. " + "This option also sets --batch" ) optparser . add_option ( "--basename" , dest = "basename" , action = "store_true" , default = False , help = "Filenames strip off basename, " "(e.g. for regression tests)" ) optparser . add_option ( "--different" , dest = "different" , action = "store_true" , default = True , help = "Consecutive stops should have different " "positions" ) optparser . disable_interspersed_args ( ) sys . argv = list ( sys_argv ) ( opts , sys . argv ) = optparser . parse_args ( ) dbg_opts = { } return opts , dbg_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.
Handle debugger options . Set option_list if you are writing another main program and want to extend the existing set of debugger options .