A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2000-July/006470.html below:

[Python-Dev] urllib vs. cgi

[Python-Dev] urllib vs. cgi [Python-Dev] urllib vs. cgiJeremy Hylton jeremy@beopen.com
Thu, 13 Jul 2000 22:28:10 -0400 (EDT)
I was doing a little Web programming this evening and discovered an
annoying asymmetry.  The urllib module has a urlencode function that
translates a dictionary of form entries into a URL query string.  I
wanted the inverse "urldecode" that turns the query string into the
dictionary.  There isn't one.

But I guessed that CGI programmers had to have a function to do this!
It seems there is one called cgi.parse_qs.  This wasn't an obvious
place to look, because I wasn't doing CGI programming at all.  (I was
writing a screen-scraped for SourceForge.)

Any opinions on adding a symmetrical urldecode to urllib?  I'm not
thrilled by duplicating code, but the cgi module is big and hairy and
urllib seems like the obvious place for it.

Jeremy




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4