• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email


src/b/o/boss-HEAD/boss.py   boss(Download)
from simplejson import loads, dumps
from urllib2 import urlopen, Request, build_opener, HTTPHandler
from urllib import quote_plus, unquote_plus
from UserList import UserList
 
"""
Fat-Free library for Boss Search API. This provides a list based interface to Yahoo Boss API. 
        self.config = config
        self.strip = strip
        self.user_agent = user_agent
        self.opener = build_opener(HTTPHandler(debuglevel=0))
        self.size, self.data = self.fetch(0, fetch_first)
        self.fetch_first = fetch_first
 

src/b/o/boss-0.2/boss.py   boss(Download)
from simplejson import loads, dumps
from urllib2 import urlopen, Request, build_opener, HTTPHandler
from urllib import quote_plus, unquote_plus
from UserList import UserList
 
"""
Fat-Free library for Boss Search API. This provides a list based interface to Yahoo Boss API. 
        self.config = config
        self.strip = strip
        self.user_agent = user_agent
        self.opener = build_opener(HTTPHandler(debuglevel=0))
        self.size, self.data = self.fetch(0, fetch_first)
        self.fetch_first = fetch_first
 

src/s/q/sqmediumlite-1.7.1/_sqmediumlite/optional/urls.py   sqmediumlite(Download)
 
import sys
if sys.version_info < (3,):
    from urllib2 import \
            HTTPBasicAuthHandler, HTTPHandler, \
            HTTPPasswordMgrWithDefaultRealm, ProxyBasicAuthHandler, \
            ProxyHandler, Request, build_opener

src/f/i/fixofx-HEAD/3rdparty/wsgi_intercept/urllib2_intercept/wsgi_urllib2.py   fixofx(Download)
import sys
from wsgi_intercept import WSGI_HTTPConnection
 
import urllib2, httplib
from urllib2 import HTTPHandler, HTTPSHandler
from httplib import HTTP
 
    class WSGI_HTTPHandler(HTTPHandler):
        """
        Override the default HTTPHandler class with one that uses the
        WSGI_HTTPConnection class to open HTTP URLs.
        """
        def http_open(self, req):
            return self.do_open(WSGI_HTTP, req)
 
    # I'm not implementing HTTPS for 2.3 until someone complains about it! -Kumar
    WSGI_HTTPSHandler = None
 
else:
    class WSGI_HTTPHandler(HTTPHandler):

src/w/s/wsgi_intercept-0.4/wsgi_intercept/urllib2_intercept/wsgi_urllib2.py   wsgi_intercept(Download)
import sys
from wsgi_intercept import WSGI_HTTPConnection
 
import urllib2, httplib
from urllib2 import HTTPHandler, HTTPSHandler
from httplib import HTTP
 
    class WSGI_HTTPHandler(HTTPHandler):
        """
        Override the default HTTPHandler class with one that uses the
        WSGI_HTTPConnection class to open HTTP URLs.
        """
        def http_open(self, req):
            return self.do_open(WSGI_HTTP, req)
 
    # I'm not implementing HTTPS for 2.3 until someone complains about it! -Kumar
    WSGI_HTTPSHandler = None
 
else:
    class WSGI_HTTPHandler(HTTPHandler):

src/c/o/collective.solr-1.0/src/collective/solr/timeout.py   collective.solr(Download)
from urllib2 import build_opener, HTTPHandler
from httplib import HTTPConnection
from socket import getaddrinfo, socket, error, SOCK_STREAM
 
 
class HTTPConnectionWithTimeout(HTTPConnection):
 
class HTTPHandlerWithTimeout(HTTPHandler):
    """ an http handler supporting timeouts on the underlying socket """
 
    def __init__(self, timeout=None, *args, **kw):
        HTTPHandler.__init__(self, *args, **kw)
        self.timeout = timeout
 

src/s/a/sage-HEAD/trunk/local/lib/python2.4/test/test_urllib2.py   sage(Download)
        class MockHTTPHandler(urllib2.HTTPHandler):
            def __init__(self): self._count = 0
            def http_open(self, req):
                import mimetools
                from StringIO import StringIO
                if self._count == 0:
                    self._count = self._count + 1
                    return MockResponse(200, "OK", msg, "", req.get_full_url())
        # cookies shouldn't leak into redirected requests
        from cookielib import CookieJar
        from urllib2 import build_opener, HTTPHandler, HTTPError, \
             HTTPCookieProcessor
 
        from test_cookielib import interact_netscape
        class MyHTTPHandler(urllib2.HTTPHandler): pass
        class FooHandler(urllib2.BaseHandler):
            def foo_open(self): pass
        class BarHandler(urllib2.BaseHandler):
            def bar_open(self): pass
 
        build_opener = urllib2.build_opener
        self.opener_has_handler(o, urllib2.HTTPHandler)
        o = build_opener(urllib2.HTTPHandler)
        self.opener_has_handler(o, urllib2.HTTPHandler)
        o = build_opener(urllib2.HTTPHandler())
        self.opener_has_handler(o, urllib2.HTTPHandler)
 
    def opener_has_handler(self, opener, handler_class):

src/x/b/xbmc-HEAD/xbmc/lib/libPython/Python/Lib/test/test_urllib2.py   xbmc(Download)
        class MockHTTPHandler(urllib2.HTTPHandler):
            def __init__(self): self._count = 0
            def http_open(self, req):
                import mimetools
                from StringIO import StringIO
                if self._count == 0:
                    self._count = self._count + 1
                    return MockResponse(200, "OK", msg, "", req.get_full_url())
        # cookies shouldn't leak into redirected requests
        from cookielib import CookieJar
        from urllib2 import build_opener, HTTPHandler, HTTPError, \
             HTTPCookieProcessor
 
        from test_cookielib import interact_netscape
        class MyHTTPHandler(urllib2.HTTPHandler): pass
        class FooHandler(urllib2.BaseHandler):
            def foo_open(self): pass
        class BarHandler(urllib2.BaseHandler):
            def bar_open(self): pass
 
        build_opener = urllib2.build_opener
        self.opener_has_handler(o, urllib2.HTTPHandler)
        o = build_opener(urllib2.HTTPHandler)
        self.opener_has_handler(o, urllib2.HTTPHandler)
        o = build_opener(urllib2.HTTPHandler())
        self.opener_has_handler(o, urllib2.HTTPHandler)
 
    def opener_has_handler(self, opener, handler_class):

src/s/a/sage-HEAD/local/lib/python2.4/test/test_urllib2.py   sage(Download)
        class MockHTTPHandler(urllib2.HTTPHandler):
            def __init__(self): self._count = 0
            def http_open(self, req):
                import mimetools
                from StringIO import StringIO
                if self._count == 0:
                    self._count = self._count + 1
                    return MockResponse(200, "OK", msg, "", req.get_full_url())
        # cookies shouldn't leak into redirected requests
        from cookielib import CookieJar
        from urllib2 import build_opener, HTTPHandler, HTTPError, \
             HTTPCookieProcessor
 
        from test_cookielib import interact_netscape
        class MyHTTPHandler(urllib2.HTTPHandler): pass
        class FooHandler(urllib2.BaseHandler):
            def foo_open(self): pass
        class BarHandler(urllib2.BaseHandler):
            def bar_open(self): pass
 
        build_opener = urllib2.build_opener
        self.opener_has_handler(o, urllib2.HTTPHandler)
        o = build_opener(urllib2.HTTPHandler)
        self.opener_has_handler(o, urllib2.HTTPHandler)
        o = build_opener(urllib2.HTTPHandler())
        self.opener_has_handler(o, urllib2.HTTPHandler)
 
    def opener_has_handler(self, opener, handler_class):

src/p/y/py5-HEAD/Lib/test/test_urllib2.py   py5(Download)
        class MockHTTPHandler(urllib2.HTTPHandler):
            def __init__(self): self._count = 0
            def http_open(self, req):
                import mimetools
                from StringIO import StringIO
                if self._count == 0:
                    self._count = self._count + 1
                    return MockResponse(200, "OK", msg, "", req.get_full_url())
        # cookies shouldn't leak into redirected requests
        from cookielib import CookieJar
        from urllib2 import build_opener, HTTPHandler, HTTPError, \
             HTTPCookieProcessor
 
        from test_cookielib import interact_netscape
        class MyHTTPHandler(urllib2.HTTPHandler): pass
        class FooHandler(urllib2.BaseHandler):
            def foo_open(self): pass
        class BarHandler(urllib2.BaseHandler):
            def bar_open(self): pass
 
        build_opener = urllib2.build_opener
        self.opener_has_handler(o, urllib2.HTTPHandler)
        o = build_opener(urllib2.HTTPHandler)
        self.opener_has_handler(o, urllib2.HTTPHandler)
        o = build_opener(urllib2.HTTPHandler())
        self.opener_has_handler(o, urllib2.HTTPHandler)
 
    def opener_has_handler(self, opener, handler_class):

  1 | 2  Next