'Set up any environment changes requested (e.g., Python path
and Django settings), then run this command. If the
command raises a ``CommandError``, intercept it and print it sensibly
to stderr. If the ``--traceback`` option is present or the raised
``Exception`` is not ``CommandError``, raise it.'

def run_from_argv(self, argv):

    parser = self.create_parser(argv[0], argv[1])
    (options, args) = parser.parse_args(argv[2:])
    handle_default_options(options)
    try:
        self.execute(*args, **options.__dict__)
    except Exception as e:
        if (options.traceback or (not isinstance(e, CommandError))):
            raise
        stderr = getattr(self, u'stderr', OutputWrapper(sys.stderr, self.style.ERROR))
        stderr.write((u'%s:    %s' % (e.__class__.__name__, e)))
        sys.exit(1)
