| 1 |
#!/usr/bin/env python3 |
| 2 |
|
| 3 |
import sys |
| 4 |
|
| 5 |
ifile = sys.argv[1] |
| 6 |
ofile = sys.argv[2] |
| 7 |
|
| 8 |
with open(ifile) as f: |
| 9 |
resval = f.readline().strip() |
| 10 |
|
| 11 |
templ = '#define RESULT (%s)\n' |
| 12 |
with open(ofile, 'w', encoding='utf-8') as f: |
| 13 |
f.write(templ % (resval, )) |