Source

pyptug / webpy / templetor / te4.py

""" Very simple template based web application """
import web

render = web.template.frender('templates/code.py')

docopt = [ """remote [-v | --verbose]""",
"""remote add [-t <branch>] [-m <master>] [-f]
[--tags|--no-tags] [--mirror] <name> <url>
git_example.py remote rename <old> <new>

Options:
-v, --verbose
-t <branch>
-m <master>
-f
"""]

program = "something"
author = "Francois Dion"
email = "francois.dion@gmail.com"

output = render(program, docopt, author, email, '0.1.1')
with open(program + '.py', 'w') as f:
    f.write(str(output))