{{ py }} import sys global Toto try : Toto += 1 except : Toto = 1 {{ end }}

MicroWebSrv2 - PyhtmlTemplate Module

Platform: {{ sys.platform }}
Version: {{ sys.version }}
Global var "TestVar" : {{ TestVar }}
* Set from the main program.
Global var "Toto" : {{ Toto }}
* Refresh this page to see this variable changing.
{{ py }} print('Unescaped HTML: Okay') {{ end }}
Your address:
{{ if 'CHROME' in Request.UserAgent.upper() }} You are on Chrome browser. {{ elif 'FIREFOX' in Request.UserAgent.upper() }} You are on Firefox browser. {{ else }} You are not on Chrome or Firefox browser. {{ end }}
You are in SSL: {{ Request.IsSSL }}
Your host: {{ Request.Host }}
Requested path: {{ Request.Path }}
Your query params: {{ if not Request.QueryParams }} Test query string on this page. {{ else }} {{ end }}
Accepted content types:
Accepted encodings:
Accepted languages:
Your request is keep-alive: {{ Request.IsKeepAlive }}
Your user agent:
{{ Request.UserAgent }}