When to use pygame script ?

Create a .html file like this one :

<html><head><meta charset="utf-8"></head><script src="" type=module id="site" data-src="fs,vtx,gui" async defer>#<!--

import sys
import platform
import asyncio

async def main():
    for i in range(10):
        await asyncio.sleep(1)

# do not change/remove the following comment it is for clearly separating python code from html body
# --></script></html>

mobile demo :

the data-src tags allows for

future tags:

running the script outside browser

simple just type :

python3 -x index.html

formatting my pygame script ?

follow that issue : done, now you can use black -x -l 132 to format your code

contribute to this page