def render_to(filepath, context=None, output=None,<EOL>at_encoding=anytemplate.compat.ENCODING, **options):
res = render(filepath, context=context, **options)<EOL>anytemplate.utils.write_to_output(res, output, at_encoding)<EOL>
Render given template file and write the result string to given `output`.
The result string will be printed to sys.stdout if output is None or '-'.

:param filepath: Template file path
:param context: A dict or dict-like object to instantiate given
    template file
:param output: File path to write the rendered result string to or None/'-'
    to print it to stdout
:param at_encoding: Template encoding
:param options: Optional keyword arguments such as:

    - at_paths: Template search paths
    - at_engine: Specify the name of template engine to use explicitly or
      None to find it automatically anyhow.
    - at_cls_args: Arguments passed to instantiate template engine class
    - other keyword arguments passed to the template engine to render
      templates with specific features enabled.