Skip to content

Instantly share code, notes, and snippets.

@prescod
Created December 14, 2019 19:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prescod/b6c7c55b4c90ca8c44a06b24f4447143 to your computer and use it in GitHub Desktop.
Save prescod/b6c7c55b4c90ca8c44a06b24f4447143 to your computer and use it in GitHub Desktop.
$ pyenv shell 3.6.8
$ pip install jinja2
Collecting jinja2
Using cached https://files.pythonhosted.org/packages/65/e0/eb35e762802015cab1ccee04e8a277b03f1d8e53da3ec3106882ec42558b/Jinja2-2.10.3-py2.py3-none-any.whl
Collecting MarkupSafe>=0.23 (from jinja2)
Downloading https://files.pythonhosted.org/packages/f0/00/a6aea33f5598b080b86d6b6d1214b51afe3ffa6100b902d5aa465080083f/MarkupSafe-1.1.1-cp36-cp36m-macosx_10_6_intel.whl
Installing collected packages: MarkupSafe, jinja2
Successfully installed MarkupSafe-1.1.1 jinja2-2.10.3
You are using pip version 18.1, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
pprescod  /  tmp  python
Python 3.6.8 (default, Feb 19 2019, 17:13:58)
[GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.10.44.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from jinja2.nativetypes import NativeTemplate
>>> print(NativeTemplate("{{date}}").render(date="2012-11-12"))
1989
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment