[Python-ideas] Cookies insanity

Jim Jewett jimjjewett at gmail.com
Thu Aug 4 15:18:46 CEST 2011


On Thu, Aug 4, 2011 at 7:21 AM, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> Ram Rachum wrote:
>>
>> I am talking on python-ideas because I think that it's a problem that
>> handling cookies is so technical in Python and I think that Python should
>> provide simple cookie-handling modules.
>
> Do you have any suggestions as to what these cookie
> handling facilities might look like?
>
> Perhaps you could give us an example of the 3-4 lines
> you would like to have been able to write for this
> task.

Intentionally ignoring the current API, so as to avoid getting bogged
down in details...


    from httpclient import fetcher
    client=fetcher()  # support for cookies should be the default
    response1=client.fetch(url1)
    response2=client.fetch(url2)

-jJ



More information about the Python-ideas mailing list