title: How to save output from django call_command to a variable or file
body: <p>I am calling commands in Django from within a script similar to:</p>
  
  <pre><code>#!/usr/bin/python
  from django.core.management import call_command
  call_command('syncdb')
  call_command('runserver')
  call_command('inspectdb')
  </code></pre>
  
  <p>How to I assign the output from for instance call_command('inspectdb') to a variable or a file?</p>
  
  <p>I've tried</p>
  
  <pre><code>var = call_command('inspectdb')
  </code></pre>
  
  <p>but 'var' remains none: purpose: inspect existing tables in legacy databases not created by django</p>