Page 1 of 1

How to make urllib.parse work?

Posted: Mon Nov 22, 2021 8:57 pm
by liudr
I cloned micropython-lib in order to add necessary modules to my board (ESP32).

One of the modules I wish to use is urllib.parse for my web server. I copied a urllib/parse.py to my board /lib/urllib/parse.py.
While importing, I got complaints about defaultdict so I found collections/defaultdict.py and got to /lib/collections/defaultdict.py
Then import complains about collections.namedtuple. Now I can't find this in micropython-lib. So if urllib.parse is included in the repo, then how come it doesn't come with required modules to make it work?

FYI, I've made simpler modules work such as copying copy.py and types.py to /lib and that made deepcopy() work.

Thanks.