Skip to content

Instantly share code, notes, and snippets.

@potix2
Created December 21, 2016 14:00
Show Gist options
  • Save potix2/79cd2ff12b9ab2f0cd98e08785fc85a3 to your computer and use it in GitHub Desktop.
Save potix2/79cd2ff12b9ab2f0cd98e08785fc85a3 to your computer and use it in GitHub Desktop.
string.Template test
>>> from string import Template
>>> import os
>>> s = Template("I am $USER")
>>> s.substitute(os.environ)
'I am potix2'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment