-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
How to add a (stdlib) module? #85
Comments
you can add modules directly in the game folder, all extra modules that may be imported by submodules must be imported first in main.py nltk requires regex module which is not provided yet. You should make a request for it in https://github.com/pygame-web/pkg-porting-wasm |
Thanks @pmp-p May I know why nltk module is already provided in pkg-porting-wasm, but not regex? How can one use nltk if the module will always import regex? So, strictly speaking, nltk is also not supported yet? Also, is |
regex ( wheel from pyodide 3.11 python-wasm-sdk build ) is now staging, but i see that nltk also require xml.sax which is not in the minimal stdlib runtime so you will need to copy it from a full 3.11 stdlib client sockets are supported, that means server must use websocket protocol or lives behind a tool like websockify |
most of stdlib should not be required to make games, extra modules - if not games engines - are outside pygbag scope for now. |
Python 3.10
Pygbag 0.7.1
Trying to run pygbag on a pygame, in debug windows see stdlib module
optparse
not found.I did not use the module anywhere in my code, not sure why pygbag needs it??? I don't know how to disable importing this module
So, I try copy these 3 files from stdlib installation path to the folder containing
main.py
.It work! but another module not found, this time is
regex
. Again, I did not use this module anywhere in my code, so not sure why pygbag needs it.I try to do the same thing, by copying these files to
main.py
, but it did not work this time :(I understand I can request the package to be included in #63 , but this is stdlib, surely others will face the same problem?
This is the debug terminal logs
Also, I have 2 local imports which my main program will import scripts from, the directory tree looks like
Will this also cause problem because I see
repo['-CDN-']='http://localhost:8000/archives/repo/' does not provide want='game'
The text was updated successfully, but these errors were encountered: