source: py-scraping/mechanize/_seek.py@ 153

Last change on this file since 153 was 106, checked in by Rick van der Zwet, 15 years ago

Initial commit...

File size: 484 bytes
Line 
1from urllib2 import BaseHandler
2from _util import deprecation
3from _response import response_seek_wrapper
4
5
6class SeekableProcessor(BaseHandler):
7 """Deprecated: Make responses seekable."""
8
9 def __init__(self):
10 deprecation(
11 "See http://wwwsearch.sourceforge.net/mechanize/doc.html#seekable")
12
13 def any_response(self, request, response):
14 if not hasattr(response, "seek"):
15 return response_seek_wrapper(response)
16 return response
Note: See TracBrowser for help on using the repository browser.