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


Groups > comp.lang.python > #71014

data: protocol

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news2.arglkargh.de!news.albasani.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.004
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'urllib2': 0.07; 'data:': 0.09; 'logic': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'scheme.': 0.09; 'python': 0.11; '2.7': 0.14; 'belongs': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'splitting': 0.16; 'urllib': 0.16; 'seems': 0.21; 'header:User- Agent:1': 0.23; 'least': 0.26; 'supported': 0.26; 'header:X -Complaints-To:1': 0.27; 'testing': 0.29; 'leave': 0.29; "doesn't": 0.30; 'code': 0.31; 'open': 0.33; 'skip:u 20': 0.35; 'but': 0.35; 'there': 0.35; 'subject:data': 0.36; 'outstanding': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'skip:u 10': 0.60; 'central': 0.64; 'default': 0.69; 'received:109': 0.72; 'unusual': 0.74; 'residual': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Robin Becker <robin@reportlab.com>
Subject data: protocol
Date Wed, 07 May 2014 11:42:24 +0100
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host 109.174.168.73
User-Agent Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Thunderbird/24.5.0
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.9731.1399459361.18130.python-list@python.org> (permalink)
Lines 15
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1399459361 news.xs4all.nl 2893 [2001:888:2000:d::a6]:55197
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:71014

Show key headers only | 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