Date created: Sunday, April 30, 2023 4:08:38 PM. Last modified: Tuesday, January 16, 2024 3:31:45 PM
Jinja2 Rendering
Render:
#!/usr/bin/env python3
# pip3 install jinja2
from jinja2 import Environment, FileSystemLoader
import sys
file_loader = FileSystemLoader('.')
env = Environment(loader=file_loader)
template = env.get_template(sys.argv[1])
print(template.render())
Previous page: Django Notes
Next page: Multi-Process Parallel Sorting Comparison