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