def write_config(command, filename, sys_config):
    """
        Write a fresh config file to ``filename``.  ``command`` is a
        ``paste.script.command.Command`` object, and should be used
        for the actual operations.  It handles things like simulation
        and verbosity.

        ``sys_config`` is (if given) a dictionary of system-wide
        configuration options.
        """
