from rcc_format.util import * from os.path import basename def dump(args): write_header(args.output, args.namespace) items = [] for f in args.input: x = resource(basename(f.name), to_variable_name(f.name), f.name) items.append(x) write_item(args.output, x.variable, f.read()) write_entries(args.output, items) write_footer(args.output, args.namespace)