def process_options(debugger_name, pkg_version, sys_argv, option_list=None):
usage_str="""<STR_LIT>"""<EOL>optparser = OptionParser(usage=usage_str, option_list=option_list,<EOL>version="<STR_LIT>" % pkg_version)<EOL>optparser.add_option("<STR_LIT>", "<STR_LIT>", dest="<STR_LIT>",<EOL>action="<STR_LIT:store_true>", default=False,<EOL>help="<STR_LIT>"<EOL>"<STR_LIT>")<EOL>optparser.add_option("<STR_LIT>", "<STR_LIT>", dest="<STR_LIT>",<EOL>action="<STR_LIT:store_true>", default=False,<EOL>help="<STR_LIT>"<EOL>"<STR_LIT>")<EOL>optparser.add_option("<STR_LIT>", dest="<STR_LIT>",<EOL>action="<STR_LIT:store_true>", default=False,<EOL>help="<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<EOL>optparser.add_option("<STR_LIT>", dest="<STR_LIT>",<EOL>action='<STR_LIT:store_true>',<EOL>help="<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>")<EOL>optparser.add_option("<STR_LIT>", "<STR_LIT>", dest="<STR_LIT>",<EOL>action="<STR_LIT:store>", type='<STR_LIT:string>', metavar='<STR_LIT>',<EOL>help="<STR_LIT>")<EOL>optparser.add_option("<STR_LIT>", dest="<STR_LIT>",<EOL>action="<STR_LIT:store>", type='<STR_LIT:string>', metavar='<STR_LIT>',<EOL>help="<STR_LIT>")<EOL>optparser.add_option("<STR_LIT>", dest="<STR_LIT>",<EOL>action="<STR_LIT:store_true>", default=True,<EOL>help="<STR_LIT>")<EOL>optparser.add_option("<STR_LIT>", dest="<STR_LIT>",<EOL>action="<STR_LIT:store_true>", default=False,<EOL>help="<STR_LIT>")<EOL>optparser.add_option("<STR_LIT>", dest="<STR_LIT>",<EOL>action="<STR_LIT:store_true>", default=True,<EOL>help="<STR_LIT>"<EOL>"<STR_LIT>")<EOL>optparser.add_option("<STR_LIT>", "<STR_LIT>", dest="<STR_LIT>", type="<STR_LIT:string>",<EOL>help="<STR_LIT>" +<EOL>"<STR_LIT>")<EOL>optparser.add_option("<STR_LIT>", "<STR_LIT>", dest="<STR_LIT:host>", default='<STR_LIT:127.0.0.1>',<EOL>action="<STR_LIT:store>", type='<STR_LIT:string>', metavar='<STR_LIT>',<EOL>help="<STR_LIT>"<EOL>"<STR_LIT>")<EOL>optparser.add_option("<STR_LIT>", dest="<STR_LIT>",<EOL>action="<STR_LIT:store>", type='<STR_LIT:string>',<EOL>metavar='<STR_LIT>',<EOL>default='<STR_LIT>',<EOL>help="<STR_LIT>"<EOL>"<STR_LIT>")<EOL>optparser.add_option("<STR_LIT>", dest="<STR_LIT>",<EOL>action='<STR_LIT:store_true>', default=False,<EOL>help="<STR_LIT>")<EOL>optparser.add_option("<STR_LIT>", dest="<STR_LIT>",<EOL>action="<STR_LIT:store_true>", default=True,<EOL>help="<STR_LIT>"<EOL>)<EOL>optparser.add_option("<STR_LIT>", dest="<STR_LIT>",<EOL>action="<STR_LIT>", default=True,<EOL>help="<STR_LIT>"<EOL>)<EOL>optparser.add_option("<STR_LIT>", dest="<STR_LIT>",<EOL>action='<STR_LIT:store_true>', default=True,<EOL>help=("<STR_LIT>"<EOL>"<STR_LIT>"))<EOL>optparser.add_option("<STR_LIT>", dest="<STR_LIT>",<EOL>action='<STR_LIT>', default=True,<EOL>help=("<STR_LIT>"<EOL>"<STR_LIT>"))<EOL>optparser.add_option("<STR_LIT>", "<STR_LIT>", dest="<STR_LIT>",<EOL>action="<STR_LIT:store_true>", default=False,<EOL>help=("<STR_LIT>"<EOL>"<STR_LIT>"))<EOL>optparser.add_option("<STR_LIT>", "<STR_LIT>", dest="<STR_LIT>", metavar='<STR_LIT>',<EOL>action="<STR_LIT:store>", type='<STR_LIT:string>',<EOL>help=("<STR_LIT>"<EOL>"<STR_LIT>"))<EOL>optparser.add_option("<STR_LIT>", "<STR_LIT>", dest="<STR_LIT:port>", default=<NUM_LIT>,<EOL>action="<STR_LIT:store>", type='<STR_LIT:int>',<EOL>help="<STR_LIT>"<EOL>"<STR_LIT>")<EOL>optparser.add_option("<STR_LIT>", dest="<STR_LIT>",<EOL>action='<STR_LIT:store_true>',<EOL>help="<STR_LIT>")<EOL>optparser.add_option("<STR_LIT>", dest="<STR_LIT>",<EOL>action="<STR_LIT:store_true>", default=False,<EOL>help="<STR_LIT>")<EOL>optparser.add_option("<STR_LIT>", "<STR_LIT>", dest="<STR_LIT:target>",<EOL>help=("<STR_LIT>"<EOL>"<STR_LIT>")),<EOL>optparser.add_option("<STR_LIT>", dest='<STR_LIT>', action='<STR_LIT:store_true>',<EOL>default=False, help="<STR_LIT>")<EOL>optparser.add_option("<STR_LIT>", default=<NUM_LIT:0>, type="<STR_LIT:int>",<EOL>help="<STR_LIT>")<EOL>optparser.disable_interspersed_args()<EOL>sys.argv = list(sys_argv)<EOL>(opts, sys.argv) = optparser.parse_args()<EOL>dbg_opts = {'<STR_LIT>': opts.from_ipython}<EOL>dbg_initfiles = []<EOL>if not opts.noexecute:<EOL><INDENT>add_startup_file(dbg_initfiles)<EOL><DEDENT>if opts.command:<EOL><INDENT>dbg_initfiles.append(opts.command)<EOL>pass<EOL><DEDENT>dbg_opts['<STR_LIT>'] = {'<STR_LIT>': dbg_initfiles}<EOL>if opts.cd:<EOL><INDENT>os.chdir(opts.cd)<EOL>pass<EOL><DEDENT>if opts.output:<EOL><INDENT>try:<EOL><INDENT>dbg_opts['<STR_LIT>'] = Moutput.DebuggerUserOutput(opts.output)<EOL><DEDENT>except IOError:<EOL><INDENT>_, xxx_todo_changeme, _ = sys.exc_info()<EOL>(errno, strerror) = xxx_todo_changeme.args<EOL>print("<STR_LIT>" % opts.output)<EOL>print("<STR_LIT>" % (errno, strerror))<EOL><DEDENT>except:<EOL><INDENT>print("<STR_LIT>" %<EOL>opts.output)<EOL>print(sys.exc_info()[<NUM_LIT:0>])<EOL>sys.exit(<NUM_LIT:2>)<EOL>pass<EOL><DEDENT>pass<EOL><DEDENT>return opts, dbg_opts, sys.argv<EOL>
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 optparser is returned. sys_argv is
    also updated.