I have a site on GitHub pages, and I'm trying to import libraries on Brython.
I have the project settled like this:
Project
-index.html
-brython.js
-library1
-__init__.py
-file1.py
-file2.py
-...
-library2
-__init__.py
-file1.py
-file2.py
-...
-library3
-__init__.py
-file1.py
-file2.py
-..
I want to import all modules from the libraries, but if I use import when I go to the site console, it tells me it can't find the init.py file and that it can't find library1.py like it's trying to import a single module and not all of them.
I tried looking on internet but didn't find anything that could help me, I even used ChatGPT but it's useless.
I see that some says that it's impossible to import local libraries, but the official Brython site says, that I can, so I don't know, I'm really confused by the answers on the other questions.
According to Brython documentation:
(Emphasis mine.)
I recommend you try running something like
python -m http.serverin theProjectsdirectory, and then openinghttp://localhost:8000/index.htmlin your browser`.If that doesn't help, please edit your question to include additional information like error tracebacks, and how your code imports your
librarymodules exactly.