How to use the ahk.directives.Persistent function in ahk

To help you get started, we’ve selected a few ahk examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github spyoungtech / ahk / ahk / script.py View on Github external
def render_template(self, template_name, directives=None, blocking=True, **kwargs):
        if directives is None:
            directives = set()
        else:
            directives = set(directives)
        if blocking:
            directives.add(Persistent)
        elif Persistent in directives:
            directives.remove(Persistent)

        kwargs['directives'] = directives
        template = self.env.get_template(template_name)
        return template.render(**kwargs)
github spyoungtech / ahk / ahk / script.py View on Github external
def render_template(self, template_name, directives=None, blocking=True, **kwargs):
        if directives is None:
            directives = set()
        else:
            directives = set(directives)
        if blocking:
            directives.add(Persistent)
        elif Persistent in directives:
            directives.remove(Persistent)

        kwargs['directives'] = directives
        template = self.env.get_template(template_name)
        return template.render(**kwargs)