Skip to content

Instantly share code, notes, and snippets.

@dreamingbinary
Last active July 7, 2016 08:43
Show Gist options
  • Save dreamingbinary/bbf8561e7ec34610c9603aa1b6a03bde to your computer and use it in GitHub Desktop.
Save dreamingbinary/bbf8561e7ec34610c9603aa1b6a03bde to your computer and use it in GitHub Desktop.
Python dict-style interpolation
print("Executing on %s as %s" % (env.host, env.user))
# Using dict-style interpolation is more readable and slightly shorter:
print("Executing on %(host)s as %(user)s" % env)
# Reference: http://docs.fabfile.org/en/1.11/usage/env.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment