This maybe is a bug but could be useful. (*Note: you should delete the css pyscript import)
It could be used as custom templates inline. I was looking for something like:
<py-script>
<h1>h1 Hello {name}, message.</h1>
</py-script>
But it try to use <\h1> as a variable name and gives an error, neither work with quotes.
Accidentally discovere it could be done calling variables inside print()
:
print(f"<{tag}>{content}</{tag}>")
Allowing to use more complex inline templates
print(f'<{tag} class="{myClassName}" style="background-color: {myColor}">{content}</{tag}>')