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 Cheetah.Template import Template | |
#The template text. Probably read in from a file for this project, but for an example I'll just use a string | |
templateDefinition = "This is a template. $exclamation$asdf" | |
#set up Template object | |
template = Template(templateDefinition) | |
#set the exclamation variable. | |
template.exclamation = "Woohoo" |
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
inPath = sys.argv[1] | |
if path.isdir(inPath): | |
for file in os.listdir(inPath): | |
if path.splitext(file)[1] == ".vm": | |
vmNames.append(inPath + "/" + file) |