from textwrap import dedent


def _format(string, args):
    """Dedent, and format (escaping backslashes in paths for Windows)."""
    args = (str(path).replace('\\', '\\\\') for path in args)
    return dedent(string).format(*args)