def main_lookup_index(args=[], prog_name=sys.argv[<NUM_LIT:0>]):
<EOL>ui = getUI_lookup_index(prog_name, args)<EOL>if ui.optionIsSet("<STR_LIT:test>"):<EOL><INDENT>unittest.main(argv=[sys.argv[<NUM_LIT:0>]])<EOL>sys.exit()<EOL><DEDENT>if ui.optionIsSet("<STR_LIT>"):<EOL><INDENT>ui.usage()<EOL>sys.exit()<EOL><DEDENT>verbose = (ui.optionIsSet("<STR_LIT>") is True) or DEFAULT_VERBOSITY<EOL>in_indexed, in_index = open(ui.getArgument(<NUM_LIT:0>)), open(ui.getArgument(<NUM_LIT:1>))<EOL>out_fh = sys.stdout<EOL>if ui.optionIsSet("<STR_LIT>"):<EOL><INDENT>out_fh = open(ui.getValue("<STR_LIT>"), "<STR_LIT:w>")<EOL><DEDENT>key = None<EOL>if ui.optionIsSet("<STR_LIT:key>"):<EOL><INDENT>key = ui.getValue("<STR_LIT:key>")<EOL><DEDENT>op_val = ui.getValue("<STR_LIT:type>") if ui.optionIsSet("<STR_LIT:type>") else None<EOL>lookup_func = __get_lookup(ui.getArgument(<NUM_LIT:0>), op_val)<EOL>lookup_func(in_index, in_indexed, out_fh, key, verbose)<EOL>
main entry point for the index script.

:param args:      the arguments for this script, as a list of string. Should
                  already have had the script name stripped. That is, if
                  there are no args provided, this should be an empty list.
:param prog_name: the name of the script; taken from command line args by
                  default, but you can change it if you want.