title: capturing dis.dis results
body: <p>Is there any way to get the output of <code>dis.dis()</code> without redirecting <code>sys.stdout</code>? I have tried:</p>
  
  <pre><code>out=str(dis.dis())
  </code></pre>
  
  <p>and</p>
  
  <pre><code>out=""""""
  out+=str(dis.dis())
  </code></pre>
  
  <p>However I soon found out that it returns <code>None</code>. Is there any way to fix this?</p>