[Python-ideas] Support data: URLs in urllib

Paul Moore p.f.moore at gmail.com
Wed Oct 31 08:54:29 CET 2012


On Wednesday, 31 October 2012, Mathias Panzenböck wrote:

> Sometimes it would be handy to read data:-urls just like any other url.
> While it is pretty easy to parse a data: url yourself I think it would be
> nice if urllib could do this for you.
>
> Example data url parser:
>
[...]

IIUC, this should be possible with a custom opener. While it might be nice
to have this in the stdlib, it would also be a really useful recipe to have
in the docs, showing how to create and install a simple custom opener into
the default set of openers (so that urllib.request gains the ability to
handle data rules automatically). Would you be willing to submit a doc
patch to cover this?

Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20121031/37dec5e1/attachment.html>


More information about the Python-ideas mailing list