    def format_string(self, s):
        """Render a Python format string

        Uses :meth:`Spawner.template_namespace` to populate format namespace.

        Args:

            s (str): Python format-string to be formatted.

        Returns:

            str: Formatted string, rendered
        """
        return s.format(**self.template_namespace())
Render a Python format string

Uses :meth:`Spawner.template_namespace` to populate format namespace.

Args:

s (str): Python format-string to be formatted.

Returns:

str: Formatted string, rendered
jupyterhub/spawner.py