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


Groups > comp.lang.python > #47964

Re: Must we include urllib just to decode a URL-encoded string, when using Requests?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eweka.nl!lightspeed.eweka.nl!194.134.4.91.MISMATCH!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <burak.arslan@arskom.com.tr>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'that?': 0.05; 'sys': 0.07; 'so?': 0.09; 'subject:string': 0.09; 'subject:using': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'burak': 0.16; 'from:addr:arskom.com.tr': 0.16; 'from:addr:burak.arslan': 0.16; 'from:name:burak arslan': 0.16; 'kern': 0.16; 'message- id:@arskom.com.tr': 0.16; 'received:arskomhosting.com': 0.16; 'subject: \n ': 0.16; 'subject:URL': 0.16; 'subject:when': 0.16; 'urllib': 0.16; 'urllib2,': 0.16; 'using,': 0.16; 'wrote:': 0.18; 'library': 0.18; 'thu,': 0.19; 'import': 0.22; 'cc:addr:gmail.com': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**1': 0.23; 'header:User-Agent:1': 0.23; 'server.': 0.24; 'header:In- Reply-To:1': 0.27; 'robert': 0.30; "i'm": 0.30; 'requests': 0.31; '13,': 0.31; 'yes.': 0.31; 'problem': 0.35; 'there': 0.35; 'doing': 0.36; 'subject:?': 0.36; 'whatever': 0.38; 'pm,': 0.38; 'rather': 0.38; 'sure': 0.39; 'either': 0.39; 'tell': 0.60; 'show': 0.63; 'to:addr:gmail.com': 0.65; 'other.': 0.75; 'console,': 0.84; 'subject:Must': 0.84; '2013': 0.98
Date Thu, 13 Jun 2013 16:44:37 +0300
From Burak Arslan <burak.arslan@arskom.com.tr>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130523 Thunderbird/17.0.6
MIME-Version 1.0
To Dotan Cohen <dotancohen@gmail.com>
Subject Re: Must we include urllib just to decode a URL-encoded string, when using Requests?
References <CAKDXFkO6t9dkYTrughGL4DzBfAOypia7w34hkmFAN9xext9TWA@mail.gmail.com> <kpcgvj$m7p$1@ger.gmane.org> <CAKDXFkOYUgb-Sw=MK3SpSNPUAO+ubt248E9KX39aK8T7+=ZcUQ@mail.gmail.com>
In-Reply-To <CAKDXFkOYUgb-Sw=MK3SpSNPUAO+ubt248E9KX39aK8T7+=ZcUQ@mail.gmail.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Cc "python-list." <python-list@python.org>, Robert Kern <robert.kern@gmail.com>
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 <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3196.1371131676.3114.python-list@python.org> (permalink)
Lines 22
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1371131676 news.xs4all.nl 15866 [2001:888:2000:d::a6]:56963
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:47964

Show key headers only | View raw


On 06/13/13 16:25, Dotan Cohen wrote:
> On Thu, Jun 13, 2013 at 4:20 PM, Robert Kern <robert.kern@gmail.com> wrote:
>> Yes. Do you think there is a problem with doing so?
>>
> I'm pretty sure that Requests will use either urllib or urllib2,
> depending on what is available on the server. I would like to use
> whatever Requests is currently using, rather than import the other.
> Can I tell which library Requests is currently using and use that?
>

paste this to your python console, it'll show you what modules requests 
imports:


import sys
p = set(sys.modules)
import requests
for m in sorted(set(sys.modules) - p):
   print(m)


burak

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


Thread

Re: Must we include urllib just to decode a URL-encoded string, when using Requests? Burak Arslan <burak.arslan@arskom.com.tr> - 2013-06-13 16:44 +0300

csiph-web