[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-list
Subject:    Re: Must we include urllib just to decode a URL-encoded string, when using Requests?
From:       Dotan Cohen <dotancohen () gmail ! com>
Date:       2013-06-13 13:52:45
Message-ID: CAKDXFkPvhcEuPahHo1wEVDiQFAfAhDr8JaWDkS3bkbTDRWfp_g () mail ! gmail ! com
[Download RAW message or body]

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
-- 
http://mail.python.org/mailman/listinfo/python-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic