Posting CGI

Fredrik Lundh effbot at
Sun Apr 23 12:31:37 EDT 2000

Z 3 Penguin <z3penguin at> wrote:
> How would I go about submiting a CGI post form in python?  (This sounds
> it should be simple, but I can't figure it out :-) Thanks.

    import urllib

    request = urllib.urlencode({
        "name": "effbot",
        "email": "effbot at"

    fp = urllib.urlopen("http://www.spam.egg", request)

    response =


<!-- (the eff-bot guide to) the standard python library:

More information about the Python-list mailing list