title: How to pass a variable to magic ´run´ function in IPython
body: <p>I want to do something like the following:</p>
  
  <pre><code>In[1]: name = 'long_name_to_type_every_now_and_then.py'
  
  In[2]: %run name
  </code></pre>
  
  <p>but this actually tries to run <code>'name.py'</code>, which is not what I want to do.</p>
  
  <p>Is there a general way to turn variables into strings? </p>
  
  <p>Something like the following:</p>
  
  <pre><code>In[3]: %run %name%
  </code></pre>