1#!/usr/bin/env python3 2 3import sys 4 5ifile = sys.argv[1] 6ofile = sys.argv[2] 7 8with open(ifile, 'r') as f: 9 resname = f.readline().strip() 10 11templ = 'const char %s[] = "%s";\n' 12with open(ofile, 'w') as f: 13 f.write(templ % (resname, resname)) 14