Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pygame-script ? #24

Closed
pmp-p opened this issue Jun 8, 2022 · 4 comments
Closed

pygame-script ? #24

pmp-p opened this issue Jun 8, 2022 · 4 comments
Labels
RFC TESTING wip feature partially implemented

Comments

@pmp-p
Copy link
Member

pmp-p commented Jun 8, 2022

What about supporting the
tag from https://pyscript.net/examples/ from pygbag loader ?

 <py-script>
from datetime import datetime
now = datetime.now()
now.strftime("%m/%d/%Y, %H:%M:%S")
    </py-script>

Which would allow to write python code directly in html

Note that Brython and Wapy use <script type="text/python"> instead
but we are way closer to Pyodide than Brython

@pmp-p
Copy link
Member Author

pmp-p commented Aug 10, 2022

Own syntax is :


<html lang="en-us"><script src="https://pygame-web.github.io/python-wasm-plus/runpy.js?cpython3.11#" type=module id="main" data-src="vtx,fs,gui" async defer>#<!--

print("Hello World")

# --></script>

data-src tag hold various features :


vt : means -very- simple vt100
vtx : means xterm.js+sixel
fs: means BrowserFS and file download/upload, archive mounting etc.
gui: means canvas ( required for pygame )

@pmp-p pmp-p added the next release wip label Aug 25, 2022
@pmp-p
Copy link
Member Author

pmp-p commented Aug 30, 2022

black formatting issue for non standard shebang psf/black#3214

@pmp-p
Copy link
Member Author

pmp-p commented Sep 14, 2022

documentation starts here https://pygame-web.github.io/wiki/pygame-script/

@pmp-p pmp-p added TESTING wip feature partially implemented and removed next release wip labels Sep 20, 2022
@pmp-p
Copy link
Member Author

pmp-p commented Feb 20, 2023

now works well enough. though importing folders could be improved a lot

@pmp-p pmp-p closed this as completed Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFC TESTING wip feature partially implemented
Projects
None yet
Development

No branches or pull requests

1 participant