chrome/tools/build/win/resedit.py
def main(options, args):
  """Main program for the script."""
  if options.verbose:
    logging.basicConfig(level=logging.INFO)

  # Create the editor for our input file.
  editor = ResourceEditor(args[0], options.output_file)

  if options.extract_all:
    editor.ExtractAllToDir(options.extract_all)

  for res_type, res_lang, res_name, dest_file in options.extract:
    res_type, res_lang, res_name = _ConvertInts(res_type, res_lang, res_name)
    editor.ExtractResource(res_type, res_lang, res_name, dest_file)

  for res_type, res_lang, res_name in options.remove:
    res_type, res_lang, res_name = _ConvertInts(res_type, res_lang, res_name)
    editor.RemoveResource(res_type, res_lang, res_name)

  for res_type, res_lang, res_name, src_file in options.update:
    res_type, res_lang, res_name = _ConvertInts(res_type, res_lang, res_name)
    editor.UpdateResource(res_type, res_lang, res_name, src_file)

  if editor.modified:
    editor.Commit()
Main program for the script.
Main program for the script.
Main program for the script .
def main(options, args):
  if options.verbose:
    logging.basicConfig(level=logging.INFO)
  editor = ResourceEditor(args[0], options.output_file)
  if options.extract_all:
    editor.ExtractAllToDir(options.extract_all)
  for res_type, res_lang, res_name, dest_file in options.extract:
    res_type, res_lang, res_name = _ConvertInts(res_type, res_lang, res_name)
    editor.ExtractResource(res_type, res_lang, res_name, dest_file)
  for res_type, res_lang, res_name in options.remove:
    res_type, res_lang, res_name = _ConvertInts(res_type, res_lang, res_name)
    editor.RemoveResource(res_type, res_lang, res_name)
  for res_type, res_lang, res_name, src_file in options.update:
    res_type, res_lang, res_name = _ConvertInts(res_type, res_lang, res_name)
    editor.UpdateResource(res_type, res_lang, res_name, src_file)
  if editor.modified:
    editor.Commit()
def main ( options , args ) : if options . verbose : logging . basicConfig ( level = logging . INFO ) editor = ResourceEditor ( args [ 0 ] , options . output_file ) if options . extract_all : editor . ExtractAllToDir ( options . extract_all ) for res_type , res_lang , res_name , dest_file in options . extract : res_type , res_lang , res_name = _ConvertInts ( res_type , res_lang , res_name ) editor . ExtractResource ( res_type , res_lang , res_name , dest_file ) for res_type , res_lang , res_name in options . remove : res_type , res_lang , res_name = _ConvertInts ( res_type , res_lang , res_name ) editor . RemoveResource ( res_type , res_lang , res_name ) for res_type , res_lang , res_name , src_file in options . update : res_type , res_lang , res_name = _ConvertInts ( res_type , res_lang , res_name ) editor . UpdateResource ( res_type , res_lang , res_name , src_file ) if editor . modified : editor . Commit ( )
Main program for the script.
Main program for the script .
"""Main program for the script.""" # Create the editor for our input file.
options
args