Show More
@@ -35,6 +35,13 b' class httprangereader(object):' | |||||
35 | self.pos = 0 |
|
35 | self.pos = 0 | |
36 | self.opener = opener |
|
36 | self.opener = opener | |
37 | self.name = url |
|
37 | self.name = url | |
|
38 | ||||
|
39 | def __enter__(self): | |||
|
40 | return self | |||
|
41 | ||||
|
42 | def __exit__(self, exc_type, exc_value, traceback): | |||
|
43 | self.close() | |||
|
44 | ||||
38 | def seek(self, pos): |
|
45 | def seek(self, pos): | |
39 | self.pos = pos |
|
46 | self.pos = pos | |
40 | def read(self, bytes=None): |
|
47 | def read(self, bytes=None): |
General Comments 0
You need to be logged in to leave comments.
Login now