How to make urllib.parse work?

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
User avatar
liudr
Posts: 211
Joined: Tue Oct 17, 2017 5:18 am

How to make urllib.parse work?

Post by liudr » Mon Nov 22, 2021 8:57 pm

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.

Post Reply