Show More
@@ -6,6 +6,7 | |||
|
6 | 6 | |
|
7 | 7 | from __future__ import absolute_import |
|
8 | 8 | |
|
9 | import abc | |
|
9 | 10 | import cgi |
|
10 | 11 | import struct |
|
11 | 12 | import sys |
@@ -37,12 +38,15 class abstractserverproto(object): | |||
|
37 | 38 | Used as reference and documentation. |
|
38 | 39 | """ |
|
39 | 40 | |
|
41 | __metaclass__ = abc.ABCMeta | |
|
42 | ||
|
43 | @abc.abstractmethod | |
|
40 | 44 | def getargs(self, args): |
|
41 | 45 | """return the value for arguments in <args> |
|
42 | 46 | |
|
43 | 47 | returns a list of values (same order as <args>)""" |
|
44 | raise NotImplementedError() | |
|
45 | 48 | |
|
49 | @abc.abstractmethod | |
|
46 | 50 | def getfile(self, fp): |
|
47 | 51 | """write the whole content of a file into a file like object |
|
48 | 52 | |
@@ -52,13 +56,12 class abstractserverproto(object): | |||
|
52 | 56 | |
|
53 | 57 | chunk size is the ascii version of the int. |
|
54 | 58 | """ |
|
55 | raise NotImplementedError() | |
|
56 | 59 | |
|
60 | @abc.abstractmethod | |
|
57 | 61 | def redirect(self): |
|
58 | 62 | """may setup interception for stdout and stderr |
|
59 | 63 | |
|
60 | 64 | See also the `restore` method.""" |
|
61 | raise NotImplementedError() | |
|
62 | 65 | |
|
63 | 66 | # If the `redirect` function does install interception, the `restore` |
|
64 | 67 | # function MUST be defined. If interception is not used, this function |
General Comments 0
You need to be logged in to leave comments.
Login now