Use new-style object in Python 2.7
Escape '$' to prevent spurious variable substitutions