Created
May 25, 2017 06:46
-
-
Save standbyme/f122881ced3297a789b8f26fb28bf282 to your computer and use it in GitHub Desktop.
Template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from string import Template | |
with open("template.md", 'r') as file: | |
templateFile = file.read() | |
with open("main.c", 'r') as file: | |
code = file.read() | |
template = Template(templateFile) | |
print(template.safe_substitute(code=code)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment