Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #71014

data: protocol

From Robin Becker <robin@reportlab.com>
Subject data: protocol
Date 2014-05-07 11:42 +0100
Newsgroups comp.lang.python
Message-ID <mailman.9731.1399459361.18130.python-list@python.org> (permalink)

Show all headers | View raw


I have an outstanding request for ReportLab to allow images to be opened using 
the data: scheme. That used to be supported in python 2.7 using urllib, but in 
python 3.3 urllib2 --> urllib and at least the default urlopener doesn't support 
data:

Is there a way to use the residual legacy of the old urllib code that's now in 
urllib.URLopener to open unusual schemes? I know it can be used directly eg

urllib.request.URLopener().open('data:.........')

but that seems to leave the splitting & testing logic up to me when it logically 
belongs in some central place ie urllib.request.urlopen.
-- 
Robin Becker

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

data: protocol Robin Becker <robin@reportlab.com> - 2014-05-07 11:42 +0100
  Re: data: protocol Steven D'Aprano <steve@pearwood.info> - 2014-05-08 03:46 +0000
    Re: data: protocol Robin Becker <robin@reportlab.com> - 2014-05-08 11:34 +0100
    Re: data: protocol Ian Kelly <ian.g.kelly@gmail.com> - 2014-05-08 09:07 -0600
    Re: data: protocol Robin Becker <robin@reportlab.com> - 2014-05-08 17:52 +0100

csiph-web