title: How to use julia string macros with a variable?
body: <p>Apologies if this has already been answered, but I'm having a surprisingly hard time using the "py" string macro included with the PyCall library when I feed it a variable representing a string instead of a simple string.</p>
  
  <p>Examples:</p>
  
  <pre><code>@py_str "2 + 2" 
  </code></pre>
  
  <p>returns 4</p>
  
  <pre><code>z = "2 + 2"
  @py_str z
  </code></pre>
  
  <p>causes a error that interpolate_pycode does not take an Expr argument, as does @py_str ($(z)).</p>
  
  <p>How can I pass @py_str a string variable?</p>
  
  <p>(Just to clarify - above was a toy example, I'm using it for an application where it really is necessary).</p>