title: Display SVG in IPython notebook from a function
body: <p>In IPython notebook, the following code displays the SVG below the cell:</p>
  
  <pre><code>from IPython.display import SVG
  SVG(url='http://upload.wikimedia.org/wikipedia/en/a/a4/Flag_of_the_United_States.svg')
  </code></pre>
  
  <p>The following displays nothing:</p>
  
  <pre><code>from IPython.display import SVG
  def show_svg():
      SVG(url='http://upload.wikimedia.org/wikipedia/en/a/a4/Flag_of_the_United_States.svg')
  </code></pre>
  
  <p>Is there a way to display an SVG from within a function (or a class)?</p>