Guild icon
PyScript πŸ’»
πŸ—‘ | Server Dump / β•°β•Έmaking-this
Got something interesting cooking? Tell us about it here. Share your progress. Show the things!
Avatar
Making this for Math people πŸ˜„
βœ… 2
Avatar
Deleted User 30/05/2022 20:24
Building an extension with pyscript for everyone!
πŸ‘ 4
Avatar
Jeff Glass 15/08/2022 20:54
Working on an integration for the Rich terminal formatting library into PyScript, to allow for beautiful code output https://github.com/Textualize/rich
β™₯️ 7
Avatar
Avatar
Jeff Glass
Working on an integration for the Rich terminal formatting library into PyScript, to allow for beautiful code output https://github.com/Textualize/rich
wow awesome! πŸ˜„
Avatar
Avatar
Deleted User
Building an extension with pyscript for everyone!
How
Avatar
Avatar
Jarriq
How
for building wheel of binary extensions i would suggest using https://github.com/pygame-web/python-wasm-sdk/releases on some ubuntu22.04 and use /opt/python-wasm-sdk/python3-wasm setup.py bdist_wheel
Avatar
Avatar
pmp-p
for building wheel of binary extensions i would suggest using https://github.com/pygame-web/python-wasm-sdk/releases on some ubuntu22.04 and use /opt/python-wasm-sdk/python3-wasm setup.py bdist_wheel
I specifically meant the chrome plugin
Avatar
yeah my bad i read wrong i thought it was an extension for pyscript as a chrome extension, like some rpc bridge (edited)
Avatar
lots of work done pretty cool πŸ‘
Avatar
μž„μ§€ν›ˆ_CODENAME 22/07/2024 10:29
Hello! My name is jihoon lim, who is creating an education service in Korea! This time, we will make and introduce a service to learn Python in a fun way! It's an educational engine and coding workspace made using a script It's a similar form to Scratch! Please give us a lot of feedback! We are also providing materials if you want to use them in your current class! Please feel free to register! Thank you! Description Page: https://codegamerphy.imweb.me/ Coding workspace: https://neon-brioche-d0a41e.netlify.app/compiler/1/1
Web site created using create-react-app
Avatar
CyberneticDaisy 24/08/2024 08:33
I'm working on a game called FloofBytes. https://cybernetic.gay/floofbytes/ It's at a fairly early stage but there's a bit to play around with. It's kinda like a text adventure game but with a web interface instead of being a terminal application. I've got plenty of UI improvements on my to-do list but it's decently usable. And the code will need plenty of reorganising too, cos I'm finding the structure as I go. Also there's no persistent saving yet. Oh and it uses ltk. Plus it can run pyunit tests on a test page, but those will all fail currently because I significantly altered the menu flow and haven't updated the tests yet.
Avatar
CyberneticDaisy 04/09/2024 11:47
big update, now has a non-scripted title screen that opens the game page. and I rewrote some of the underlying systems. plus a few new features and interactions
Avatar
Avatar
CyberneticDaisy
big update, now has a non-scripted title screen that opens the game page. and I rewrote some of the underlying systems. plus a few new features and interactions
chris.laffra 04/09/2024 12:48
πŸ₯³ πŸš€ - I like that you use LTK πŸ€“
12:50
Also, packaging your application into a wheel and disting it as one is a nice touch, this reduces the roundtrips from the client and should help loads of the app with a fully empty browser cache.
Avatar
Avatar
chris.laffra
πŸ₯³ πŸš€ - I like that you use LTK πŸ€“
CyberneticDaisy 04/09/2024 12:54
Thanks, it's good! Makes the process pretty streamlined. And I went with the wheel cos manually managing the individual files for a sizable and growing project would be a major nuisance. The really fun thing is how I got the version number.
Avatar
chris.laffra 04/09/2024 12:56
I am going to steal this approach to make the hosted version of PySheets at https://pysheets.app more manageable. I already deploy to PyPi, so could serve the PySheets wheel from there.
πŸ‘ 2
Avatar
CyberneticDaisy 04/09/2024 14:25
Please do! The downside is it's slow testing small changes often
Avatar
Avatar
CyberneticDaisy
Thanks, it's good! Makes the process pretty streamlined. And I went with the wheel cos manually managing the individual files for a sizable and growing project would be a major nuisance. The really fun thing is how I got the version number.
I'd really like to know how to do this - any chance you could document your process ?
Avatar
Avatar
Neon22
I'd really like to know how to do this - any chance you could document your process ?
CyberneticDaisy 04/09/2024 22:14
In brief, you build a wheel according to the regular python documentation, and the pyscript config documentation tells you you can list the URL of an arbitrary .whl in the packages list. I'll give further details when I'm at my computer, but looking in pyscript.toml should help
Avatar
CyberneticDaisy 05/09/2024 06:13
So I've got my directories laid out like this. and pyproject.toml tells in what to build/include. and I build it with python3.12 -m build --wheel and the resulting .whl goes in the dist directory. if you move/remove files remember to clean it (or just delete the lib directory in build) cos otherwise it won't remove the copies of your files and you'll get weird import errors and other problems from having two (possibly different) copies of some of your source files. And then you include the path to the .whl file in your pyscript config (assuming you're serving it from the same place. or put it on pypi and load it from there)
πŸ‘ 1
06:14
I have a second pyscript config loaded by my testing page cos I don't want all users to have to wait for pytest and hypothesis
Avatar
Avatar
CyberneticDaisy
I'm working on a game called FloofBytes. https://cybernetic.gay/floofbytes/ It's at a fairly early stage but there's a bit to play around with. It's kinda like a text adventure game but with a web interface instead of being a terminal application. I've got plenty of UI improvements on my to-do list but it's decently usable. And the code will need plenty of reorganising too, cos I'm finding the structure as I go. Also there's no persistent saving yet. Oh and it uses ltk. Plus it can run pyunit tests on a test page, but those will all fail currently because I significantly altered the menu flow and haven't updated the tests yet.
CyberneticDaisy 11/09/2024 05:06
Version 2024.9.2 is now live. changes:
  • [x] default operations: so enter works
  • [x] make notes close properly on close
  • [x] menu bar with shortcuts to containers
  • [x] second menu for user-selected faves
  • [x] slider on each item to toggle it on the faves menu
  • [x] remove items from menu on quit
  • [x] remove items from menu when they are destroyed
Avatar
Have been working on this for a couple of months... An easy way to share python code which users can edit, debug and run in the browser. It can also be embedded (as an iframe) into blog posts or tutorials so readers can play with the code to get a better understanding.
  • Install python packages
  • select micropython vs pyodide interpreters
  • Set debug points just like vscode
  • Continue to next breakpoint or step over lines with debugging toolbar
  • Get local and global vars in debug pane
  • Output plots, dataframes, images to a Rich Output pane
  • format code using black
  • Terminal for all other text based print and log statements with the ability to accept input
What do you all think?
(edited)
Avatar
Looks very interesting indeed. Let us know when we can play withit
Avatar
Avatar
sai
Have been working on this for a couple of months... An easy way to share python code which users can edit, debug and run in the browser. It can also be embedded (as an iframe) into blog posts or tutorials so readers can play with the code to get a better understanding.
  • Install python packages
  • select micropython vs pyodide interpreters
  • Set debug points just like vscode
  • Continue to next breakpoint or step over lines with debugging toolbar
  • Get local and global vars in debug pane
  • Output plots, dataframes, images to a Rich Output pane
  • format code using black
  • Terminal for all other text based print and log statements with the ability to accept input
What do you all think?
(edited)
Chris Laffra 28/09/2024 20:38
Nice!
Avatar
Avatar
sai
Have been working on this for a couple of months... An easy way to share python code which users can edit, debug and run in the browser. It can also be embedded (as an iframe) into blog posts or tutorials so readers can play with the code to get a better understanding.
  • Install python packages
  • select micropython vs pyodide interpreters
  • Set debug points just like vscode
  • Continue to next breakpoint or step over lines with debugging toolbar
  • Get local and global vars in debug pane
  • Output plots, dataframes, images to a Rich Output pane
  • format code using black
  • Terminal for all other text based print and log statements with the ability to accept input
What do you all think?
(edited)
Nice job..! πŸŽ‰
Avatar
Making progress. Landing page with live examples is now ready. Also added a new functionality. Who can find it (Should be easy, made it pretty obvious i guess)?
πŸ‘ 1
Avatar
Avatar
sai
Making progress. Landing page with live examples is now ready. Also added a new functionality. Who can find it (Should be easy, made it pretty obvious i guess)?
Chris Laffra 19/10/2024 21:39
What editor are you using? I like the inline error messages. Do you have code-completion too?
Avatar
Avatar
Chris Laffra
What editor are you using? I like the inline error messages. Do you have code-completion too?
I am using Monaco editor. It has the basic code completion vscode provides, it suggests vars and methods declared, but can’t suggest python methods of objects. Need a Python LSP for that. I am trying to see if there is an LSP that I can run as a service worker.
Avatar
Chris Laffra 20/10/2024 19:09
@sai I wrote a "poor man's LSP" for PySheets. It runs inside the PySheets worker and may be a bit too entangled for you to use immediately. Anyways, see: https://github.com/PySheets/pysheets/blob/main/src/static/lsp.py#L259 (edited)
Source for PySheets. Contribute to PySheets/pysheets development by creating an account on GitHub.
Avatar
Avatar
Chris Laffra
@sai I wrote a "poor man's LSP" for PySheets. It runs inside the PySheets worker and may be a bit too entangled for you to use immediately. Anyways, see: https://github.com/PySheets/pysheets/blob/main/src/static/lsp.py#L259 (edited)
That's amazing! Thanks for pointing to your implementation!
Avatar
wip pygbag port. Contribute to pygame-web/PySDL3-wasm development by creating an account on GitHub.
Avatar
Nice!
Avatar
nice - you might be able to get the wheel in this way instead: ??
21:49
Ahh - you might have to use the latest 2025.2.4 version as I see fix to whl there as well as newer version of pyodide.... YMMV
Avatar
Avatar
Neon22
Ahh - you might have to use the latest 2025.2.4 version as I see fix to whl there as well as newer version of pyodide.... YMMV
it is not a pyodide wheel, it's a pygbag one custom made with https://github.com/pygame-web/setuptools modified for wasm abi3
12:28
the libsdl.so provided cannot be linked with pyodide's emsdk
Avatar
Original message was deleted or could not be loaded.
Does spam like this actually work? I doubt you'll find any success here.
Exported 38 message(s)
Timezone: UTC+0