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


Groups > comp.lang.python > #47963

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> <51B9CCC5.8090908@arskom.com.tr>
Date 2013-06-13 16:52 +0300
Subject Re: Must we include urllib just to decode a URL-encoded string, when using Requests?
From Dotan Cohen <dotancohen@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.3195.1371131567.3114.python-list@python.org> (permalink)

Show all headers | View raw


On Thu, Jun 13, 2013 at 4:44 PM, Burak Arslan
<burak.arslan@arskom.com.tr> wrote:
> On 06/13/13 16:25, Dotan Cohen wrote:
> 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)
>

Thank you. Python is a beautiful language, I cannot believe that the
set(sys.modules)-p line does what it does!

Interestingly, on my system with Python3 neither urllib nor urllib2
are imported, only urllib3 which I had not heard of until now:

__future__
_json
atexit
cgi
chardet
html
http.cookiejar
http.cookies
json
json.decoder
json.encoder
json.scanner
logging
mimetypes
netrc
queue
requests
requests.api
requests.auth
requests.compat
requests.cookies
requests.defaults
requests.exceptions
requests.hooks
requests.models
requests.sessions
requests.status_codes
requests.structures
requests.utils
shlex
six
six.moves
threading
urllib3
urllib3._collections
urllib3.connectionpool
urllib3.exceptions
urllib3.filepost
urllib3.packages
urllib3.packages.mimetools_choose_boundary
urllib3.packages.ssl_match_hostname
urllib3.poolmanager
urllib3.request
urllib3.response
urllib3.util


--
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com

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? Dotan Cohen <dotancohen@gmail.com> - 2013-06-13 16:52 +0300

csiph-web