Closed raventan95 closed 1 year ago
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 socket
module supported? I want to make pygame on pygbag run as a multiplayer game
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 moduleSo, 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'