| OLD | NEW |
| (Empty) | |
| 1 |
| 2 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| 3 <html><head><title>Python: module telemetry.core.memory_cache_http_server</title
> |
| 4 </head><body bgcolor="#f0f0f8"> |
| 5 |
| 6 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> |
| 7 <tr bgcolor="#7799ee"> |
| 8 <td valign=bottom> <br> |
| 9 <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a hre
f="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry
.core.html"><font color="#ffffff">core</font></a>.memory_cache_http_server</stro
ng></big></big></font></td |
| 10 ><td align=right valign=bottom |
| 11 ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href=
"file:/Users/nduca/Local/chrome/src/tools/telemetry/telemetry/core/memory_cache_
http_server.py">/Users/nduca/Local/chrome/src/tools/telemetry/telemetry/core/mem
ory_cache_http_server.py</a></font></td></tr></table> |
| 12 <p><tt># Copyright (c) 2012 The Chromium Autho
rs. All rights reserved.<br> |
| 13 # Use of this source code is governed by
a BSD-style license that can be<br> |
| 14 # found in the LICENSE file.</tt></p> |
| 15 <p> |
| 16 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 17 <tr bgcolor="#aa55cc"> |
| 18 <td colspan=3 valign=bottom> <br> |
| 19 <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big
></font></td></tr> |
| 20 |
| 21 <tr><td bgcolor="#aa55cc"><tt> </tt></td><td>
</td> |
| 22 <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=t
op><a href="BaseHTTPServer.html">BaseHTTPServer</a><br> |
| 23 <a href="SimpleHTTPServer.html">SimpleHTTPServer</a><br> |
| 24 </td><td width="25%" valign=top><a href="SocketServer.html">SocketServer</a><br> |
| 25 <a href="mimetypes.html">mimetypes</a><br> |
| 26 </td><td width="25%" valign=top><a href="os.html">os</a><br> |
| 27 <a href="sys.html">sys</a><br> |
| 28 </td><td width="25%" valign=top><a href="zlib.html">zlib</a><br> |
| 29 </td></tr></table></td></tr></table><p> |
| 30 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 31 <tr bgcolor="#ee77aa"> |
| 32 <td colspan=3 valign=bottom> <br> |
| 33 <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big
></font></td></tr> |
| 34 |
| 35 <tr><td bgcolor="#ee77aa"><tt> </tt></td><td>
</td> |
| 36 <td width="100%"><dl> |
| 37 <dt><font face="helvetica, arial"><a href="BaseHTTPServer.html#HTTPServer">BaseH
TTPServer.HTTPServer</a>(<a href="SocketServer.html#TCPServer">SocketServer.TCPS
erver</a>) |
| 38 </font></dt><dd> |
| 39 <dl> |
| 40 <dt><font face="helvetica, arial"><a href="telemetry.core.memory_cache_http_serv
er.html#MemoryCacheHTTPServer">MemoryCacheHTTPServer</a>(<a href="SocketServer.h
tml#ThreadingMixIn">SocketServer.ThreadingMixIn</a>, <a href="BaseHTTPServer.htm
l#HTTPServer">BaseHTTPServer.HTTPServer</a>) |
| 41 </font></dt></dl> |
| 42 </dd> |
| 43 <dt><font face="helvetica, arial"><a href="SimpleHTTPServer.html#SimpleHTTPReque
stHandler">SimpleHTTPServer.SimpleHTTPRequestHandler</a>(<a href="BaseHTTPServer
.html#BaseHTTPRequestHandler">BaseHTTPServer.BaseHTTPRequestHandler</a>) |
| 44 </font></dt><dd> |
| 45 <dl> |
| 46 <dt><font face="helvetica, arial"><a href="telemetry.core.memory_cache_http_serv
er.html#MemoryCacheHTTPRequestHandler">MemoryCacheHTTPRequestHandler</a> |
| 47 </font></dt></dl> |
| 48 </dd> |
| 49 <dt><font face="helvetica, arial"><a href="SocketServer.html#ThreadingMixIn">Soc
ketServer.ThreadingMixIn</a> |
| 50 </font></dt><dd> |
| 51 <dl> |
| 52 <dt><font face="helvetica, arial"><a href="telemetry.core.memory_cache_http_serv
er.html#MemoryCacheHTTPServer">MemoryCacheHTTPServer</a>(<a href="SocketServer.h
tml#ThreadingMixIn">SocketServer.ThreadingMixIn</a>, <a href="BaseHTTPServer.htm
l#HTTPServer">BaseHTTPServer.HTTPServer</a>) |
| 53 </font></dt></dl> |
| 54 </dd> |
| 55 <dt><font face="helvetica, arial"><a href="__builtin__.html#tuple">__builtin__.t
uple</a>(<a href="__builtin__.html#object">__builtin__.object</a>) |
| 56 </font></dt><dd> |
| 57 <dl> |
| 58 <dt><font face="helvetica, arial"><a href="telemetry.core.memory_cache_http_serv
er.html#ByteRange">ByteRange</a> |
| 59 </font></dt><dt><font face="helvetica, arial"><a href="telemetry.core.memory_cac
he_http_server.html#ResourceAndRange">ResourceAndRange</a> |
| 60 </font></dt></dl> |
| 61 </dd> |
| 62 </dl> |
| 63 <p> |
| 64 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 65 <tr bgcolor="#ffc8d8"> |
| 66 <td colspan=3 valign=bottom> <br> |
| 67 <font color="#000000" face="helvetica, arial"><a name="ByteRange">class <strong>
ByteRange</strong></a>(<a href="__builtin__.html#tuple">__builtin__.tuple</a>)</
font></td></tr> |
| 68 |
| 69 <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| 70 <td colspan=2><tt><a href="#ByteRange">ByteRange</a>(from_byte, to_byte)<br
> </tt></td></tr> |
| 71 <tr><td> </td> |
| 72 <td width="100%"><dl><dt>Method resolution order:</dt> |
| 73 <dd><a href="telemetry.core.memory_cache_http_server.html#ByteRange">ByteRange</
a></dd> |
| 74 <dd><a href="__builtin__.html#tuple">__builtin__.tuple</a></dd> |
| 75 <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
| 76 </dl> |
| 77 <hr> |
| 78 Methods defined here:<br> |
| 79 <dl><dt><a name="ByteRange-__getnewargs__"><strong>__getnewargs__</strong></a>(s
elf)</dt><dd><tt>Return self as a plain <a href="__buil
tin__.html#tuple">tuple</a>. Used by copy and pic
kle.</tt></dd></dl> |
| 80 |
| 81 <dl><dt><a name="ByteRange-__repr__"><strong>__repr__</strong></a>(self)</dt><dd
><tt>Return a nicely formatted representation string</t
t></dd></dl> |
| 82 |
| 83 <dl><dt><a name="ByteRange-_asdict"><strong>_asdict</strong></a>(self)</dt><dd><
tt>Return a new OrderedDict which maps field
names to their values</tt></dd></dl> |
| 84 |
| 85 <dl><dt><a name="ByteRange-_replace"><strong>_replace</strong></a>(_self, **kwds
)</dt><dd><tt>Return a new <a href="#ByteRange">ByteRange</a>&nbs
p;object replacing specified fields with new value
s</tt></dd></dl> |
| 86 |
| 87 <hr> |
| 88 Class methods defined here:<br> |
| 89 <dl><dt><a name="ByteRange-_make"><strong>_make</strong></a>(cls, iterable, new<
font color="#909090">=<built-in method __new__ of type object></font>, len
<font color="#909090">=<built-in function len></font>)<font color="#909090
"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin_
_.type</a></font></font></dt><dd><tt>Make a new <a href="#ByteRan
ge">ByteRange</a> object from a sequence or iterab
le</tt></dd></dl> |
| 90 |
| 91 <hr> |
| 92 Static methods defined here:<br> |
| 93 <dl><dt><a name="ByteRange-__new__"><strong>__new__</strong></a>(_cls, from_byte
, to_byte)</dt><dd><tt>Create new instance of <a href="#Byte
Range">ByteRange</a>(from_byte, to_byte)</tt></dd></dl> |
| 94 |
| 95 <hr> |
| 96 Data descriptors defined here:<br> |
| 97 <dl><dt><strong>from_byte</strong></dt> |
| 98 <dd><tt>Alias for field number 0</tt></dd> |
| 99 </dl> |
| 100 <dl><dt><strong>to_byte</strong></dt> |
| 101 <dd><tt>Alias for field number 1</tt></dd> |
| 102 </dl> |
| 103 <hr> |
| 104 Data and other attributes defined here:<br> |
| 105 <dl><dt><strong>_fields</strong> = ('from_byte', 'to_byte')</dl> |
| 106 |
| 107 <hr> |
| 108 Methods inherited from <a href="__builtin__.html#tuple">__builtin__.tuple</a>:<b
r> |
| 109 <dl><dt><a name="ByteRange-__add__"><strong>__add__</strong></a>(...)</dt><dd><t
t>x.<a href="#ByteRange-__add__">__add__</a>(y) <==> x+y</tt></d
d></dl> |
| 110 |
| 111 <dl><dt><a name="ByteRange-__contains__"><strong>__contains__</strong></a>(...)<
/dt><dd><tt>x.<a href="#ByteRange-__contains__">__contains__</a>(y) <==&
gt; y in x</tt></dd></dl> |
| 112 |
| 113 <dl><dt><a name="ByteRange-__eq__"><strong>__eq__</strong></a>(...)</dt><dd><tt>
x.<a href="#ByteRange-__eq__">__eq__</a>(y) <==> x==y</tt></dd><
/dl> |
| 114 |
| 115 <dl><dt><a name="ByteRange-__ge__"><strong>__ge__</strong></a>(...)</dt><dd><tt>
x.<a href="#ByteRange-__ge__">__ge__</a>(y) <==> x>=y</tt></d
d></dl> |
| 116 |
| 117 <dl><dt><a name="ByteRange-__getattribute__"><strong>__getattribute__</strong></
a>(...)</dt><dd><tt>x.<a href="#ByteRange-__getattribute__">__getattribute__</a>
('name') <==> x.name</tt></dd></dl> |
| 118 |
| 119 <dl><dt><a name="ByteRange-__getitem__"><strong>__getitem__</strong></a>(...)</d
t><dd><tt>x.<a href="#ByteRange-__getitem__">__getitem__</a>(y) <==>&
nbsp;x[y]</tt></dd></dl> |
| 120 |
| 121 <dl><dt><a name="ByteRange-__getslice__"><strong>__getslice__</strong></a>(...)<
/dt><dd><tt>x.<a href="#ByteRange-__getslice__">__getslice__</a>(i, j) 
;<==> x[i:j]<br> |
| 122 <br> |
| 123 Use of negative indices is not supported.</tt></dd
></dl> |
| 124 |
| 125 <dl><dt><a name="ByteRange-__gt__"><strong>__gt__</strong></a>(...)</dt><dd><tt>
x.<a href="#ByteRange-__gt__">__gt__</a>(y) <==> x>y</tt></dd
></dl> |
| 126 |
| 127 <dl><dt><a name="ByteRange-__hash__"><strong>__hash__</strong></a>(...)</dt><dd>
<tt>x.<a href="#ByteRange-__hash__">__hash__</a>() <==> hash(x)<
/tt></dd></dl> |
| 128 |
| 129 <dl><dt><a name="ByteRange-__iter__"><strong>__iter__</strong></a>(...)</dt><dd>
<tt>x.<a href="#ByteRange-__iter__">__iter__</a>() <==> iter(x)<
/tt></dd></dl> |
| 130 |
| 131 <dl><dt><a name="ByteRange-__le__"><strong>__le__</strong></a>(...)</dt><dd><tt>
x.<a href="#ByteRange-__le__">__le__</a>(y) <==> x<=y</tt></d
d></dl> |
| 132 |
| 133 <dl><dt><a name="ByteRange-__len__"><strong>__len__</strong></a>(...)</dt><dd><t
t>x.<a href="#ByteRange-__len__">__len__</a>() <==> len(x)</tt><
/dd></dl> |
| 134 |
| 135 <dl><dt><a name="ByteRange-__lt__"><strong>__lt__</strong></a>(...)</dt><dd><tt>
x.<a href="#ByteRange-__lt__">__lt__</a>(y) <==> x<y</tt></dd
></dl> |
| 136 |
| 137 <dl><dt><a name="ByteRange-__mul__"><strong>__mul__</strong></a>(...)</dt><dd><t
t>x.<a href="#ByteRange-__mul__">__mul__</a>(n) <==> x*n</tt></d
d></dl> |
| 138 |
| 139 <dl><dt><a name="ByteRange-__ne__"><strong>__ne__</strong></a>(...)</dt><dd><tt>
x.<a href="#ByteRange-__ne__">__ne__</a>(y) <==> x!=y</tt></dd><
/dl> |
| 140 |
| 141 <dl><dt><a name="ByteRange-__rmul__"><strong>__rmul__</strong></a>(...)</dt><dd>
<tt>x.<a href="#ByteRange-__rmul__">__rmul__</a>(n) <==> n*x</tt
></dd></dl> |
| 142 |
| 143 <dl><dt><a name="ByteRange-__sizeof__"><strong>__sizeof__</strong></a>(...)</dt>
<dd><tt>T.<a href="#ByteRange-__sizeof__">__sizeof__</a>() -- size&nbs
p;of T in memory, in bytes</tt></dd></dl> |
| 144 |
| 145 <dl><dt><a name="ByteRange-count"><strong>count</strong></a>(...)</dt><dd><tt>T.
<a href="#ByteRange-count">count</a>(value) -> integer -- 
;return number of occurrences of value</tt></dd></dl> |
| 146 |
| 147 <dl><dt><a name="ByteRange-index"><strong>index</strong></a>(...)</dt><dd><tt>T.
<a href="#ByteRange-index">index</a>(value, [start, [stop]]) ->
; integer -- return first index of value.<br> |
| 148 Raises ValueError if the value is not present
.</tt></dd></dl> |
| 149 |
| 150 </td></tr></table> <p> |
| 151 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 152 <tr bgcolor="#ffc8d8"> |
| 153 <td colspan=3 valign=bottom> <br> |
| 154 <font color="#000000" face="helvetica, arial"><a name="MemoryCacheHTTPRequestHan
dler">class <strong>MemoryCacheHTTPRequestHandler</strong></a>(<a href="SimpleHT
TPServer.html#SimpleHTTPRequestHandler">SimpleHTTPServer.SimpleHTTPRequestHandle
r</a>)</font></td></tr> |
| 155 |
| 156 <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> |
| 157 <td width="100%"><dl><dt>Method resolution order:</dt> |
| 158 <dd><a href="telemetry.core.memory_cache_http_server.html#MemoryCacheHTTPRequest
Handler">MemoryCacheHTTPRequestHandler</a></dd> |
| 159 <dd><a href="SimpleHTTPServer.html#SimpleHTTPRequestHandler">SimpleHTTPServer.Si
mpleHTTPRequestHandler</a></dd> |
| 160 <dd><a href="BaseHTTPServer.html#BaseHTTPRequestHandler">BaseHTTPServer.BaseHTTP
RequestHandler</a></dd> |
| 161 <dd><a href="SocketServer.html#StreamRequestHandler">SocketServer.StreamRequestH
andler</a></dd> |
| 162 <dd><a href="SocketServer.html#BaseRequestHandler">SocketServer.BaseRequestHandl
er</a></dd> |
| 163 </dl> |
| 164 <hr> |
| 165 Methods defined here:<br> |
| 166 <dl><dt><a name="MemoryCacheHTTPRequestHandler-GetByteRange"><strong>GetByteRang
e</strong></a>(self, total_num_of_bytes)</dt><dd><tt>Parse the header&
nbsp;and get the range values specified.<br> |
| 167 <br> |
| 168 Args:<br> |
| 169 total_num_of_bytes: Total # of bytes in&nbs
p;requested resource,<br> |
| 170 used to calculate upper range limit.<br> |
| 171 Returns:<br> |
| 172 A <a href="#ByteRange">ByteRange</a> namedtuple objec
t with the requested byte-range values.<br> |
| 173 If no Range is explicitly requested or
there is a failure parsing,<br> |
| 174 return None.<br> |
| 175 Special case: If range specified is in
the format "N-", return N-N.<br> |
| 176 If upper range limit is greater than&n
bsp;total # of bytes, return upper index.</tt></dd
></dl> |
| 177 |
| 178 <dl><dt><a name="MemoryCacheHTTPRequestHandler-SendHead"><strong>SendHead</stron
g></a>(self)</dt></dl> |
| 179 |
| 180 <dl><dt><a name="MemoryCacheHTTPRequestHandler-do_GET"><strong>do_GET</strong></
a>(self)</dt><dd><tt>Serve a GET request.</tt></dd></dl> |
| 181 |
| 182 <dl><dt><a name="MemoryCacheHTTPRequestHandler-do_HEAD"><strong>do_HEAD</strong>
</a>(self)</dt><dd><tt>Serve a HEAD request.</tt></dd></dl> |
| 183 |
| 184 <hr> |
| 185 Methods inherited from <a href="SimpleHTTPServer.html#SimpleHTTPRequestHandler">
SimpleHTTPServer.SimpleHTTPRequestHandler</a>:<br> |
| 186 <dl><dt><a name="MemoryCacheHTTPRequestHandler-copyfile"><strong>copyfile</stron
g></a>(self, source, outputfile)</dt><dd><tt>Copy all data betwee
n two file objects.<br> |
| 187 <br> |
| 188 The SOURCE argument is a file object open&nbs
p;for reading<br> |
| 189 (or anything with a read() method) and the&nb
sp;DESTINATION<br> |
| 190 argument is a file object open for writing&nb
sp;(or<br> |
| 191 anything with a write() method).<br> |
| 192 <br> |
| 193 The only reason for overriding this would be&
nbsp;to change<br> |
| 194 the block size or perhaps to replace newlines
by CRLF<br> |
| 195 -- note however that this the default server&
nbsp;uses this<br> |
| 196 to copy binary data as well.</tt></dd></dl> |
| 197 |
| 198 <dl><dt><a name="MemoryCacheHTTPRequestHandler-guess_type"><strong>guess_type</s
trong></a>(self, path)</dt><dd><tt>Guess the type of a
file.<br> |
| 199 <br> |
| 200 Argument is a PATH (a filename).<br> |
| 201 <br> |
| 202 Return value is a string of the form typ
e/subtype,<br> |
| 203 usable for a MIME Content-type header.<br> |
| 204 <br> |
| 205 The default implementation looks the file's extens
ion<br> |
| 206 up in the table self.<strong>extensions_map</strong>, u
sing application/octet-stream<br> |
| 207 as a default; however it would be permissible
(if<br> |
| 208 slow) to look inside the data to make a&
nbsp;better guess.</tt></dd></dl> |
| 209 |
| 210 <dl><dt><a name="MemoryCacheHTTPRequestHandler-list_directory"><strong>list_dire
ctory</strong></a>(self, path)</dt><dd><tt>Helper to produce a&nb
sp;directory listing (absent index.html).<br> |
| 211 <br> |
| 212 Return value is either a file object, or 
;None (indicating an<br> |
| 213 error). In either case, the headers are 
;sent, making the<br> |
| 214 interface the same as for <a href="#MemoryCacheHTTPRequ
estHandler-send_head">send_head</a>().</tt></dd></dl> |
| 215 |
| 216 <dl><dt><a name="MemoryCacheHTTPRequestHandler-send_head"><strong>send_head</str
ong></a>(self)</dt><dd><tt>Common code for GET and HEAD
commands.<br> |
| 217 <br> |
| 218 This sends the response code and MIME headers
.<br> |
| 219 <br> |
| 220 Return value is either a file object (which&n
bsp;has to be copied<br> |
| 221 to the outputfile by the caller unless the&nb
sp;command was HEAD,<br> |
| 222 and must be closed by the caller under a
ll circumstances), or<br> |
| 223 None, in which case the caller has nothing&nb
sp;further to do.</tt></dd></dl> |
| 224 |
| 225 <dl><dt><a name="MemoryCacheHTTPRequestHandler-translate_path"><strong>translate
_path</strong></a>(self, path)</dt><dd><tt>Translate a /-separated&nbs
p;PATH to the local filename syntax.<br> |
| 226 <br> |
| 227 Components that mean special things to the lo
cal file system<br> |
| 228 (e.g. drive or directory names) are ignored.
(XXX They should<br> |
| 229 probably be diagnosed.)</tt></dd></dl> |
| 230 |
| 231 <hr> |
| 232 Data and other attributes inherited from <a href="SimpleHTTPServer.html#SimpleHT
TPRequestHandler">SimpleHTTPServer.SimpleHTTPRequestHandler</a>:<br> |
| 233 <dl><dt><strong>extensions_map</strong> = {'': 'application/octet-stream', '.123
': 'application/vnd.lotus-1-2-3', '.3dml': 'text/vnd.in3d.3dml', '.3g2': 'video/
3gpp2', '.3gp': 'video/3gpp', '.7z': 'application/x-7z-compressed', '.a': 'appli
cation/octet-stream', '.aab': 'application/x-authorware-bin', '.aac': 'audio/x-a
ac', '.aam': 'application/x-authorware-map', ...}</dl> |
| 234 |
| 235 <dl><dt><strong>server_version</strong> = 'SimpleHTTP/0.6'</dl> |
| 236 |
| 237 <hr> |
| 238 Methods inherited from <a href="BaseHTTPServer.html#BaseHTTPRequestHandler">Base
HTTPServer.BaseHTTPRequestHandler</a>:<br> |
| 239 <dl><dt><a name="MemoryCacheHTTPRequestHandler-address_string"><strong>address_s
tring</strong></a>(self)</dt><dd><tt>Return the client address&nb
sp;formatted for logging.<br> |
| 240 <br> |
| 241 This version looks up the full hostname using
gethostbyaddr(),<br> |
| 242 and tries to find a name that contains a
t least one dot.</tt></dd></dl> |
| 243 |
| 244 <dl><dt><a name="MemoryCacheHTTPRequestHandler-date_time_string"><strong>date_ti
me_string</strong></a>(self, timestamp<font color="#909090">=None</font>)</dt><d
d><tt>Return the current date and time formatted&n
bsp;for a message header.</tt></dd></dl> |
| 245 |
| 246 <dl><dt><a name="MemoryCacheHTTPRequestHandler-end_headers"><strong>end_headers<
/strong></a>(self)</dt><dd><tt>Send the blank line ending&nb
sp;the MIME headers.</tt></dd></dl> |
| 247 |
| 248 <dl><dt><a name="MemoryCacheHTTPRequestHandler-handle"><strong>handle</strong></
a>(self)</dt><dd><tt>Handle multiple requests if necessary.<
/tt></dd></dl> |
| 249 |
| 250 <dl><dt><a name="MemoryCacheHTTPRequestHandler-handle_one_request"><strong>handl
e_one_request</strong></a>(self)</dt><dd><tt>Handle a single HTTP
request.<br> |
| 251 <br> |
| 252 You normally don't need to override this meth
od; see the class<br> |
| 253 __doc__ string for information on how to hand
le specific HTTP<br> |
| 254 commands such as GET and POST.</tt></dd></dl> |
| 255 |
| 256 <dl><dt><a name="MemoryCacheHTTPRequestHandler-log_date_time_string"><strong>log
_date_time_string</strong></a>(self)</dt><dd><tt>Return the current&nb
sp;time formatted for logging.</tt></dd></dl> |
| 257 |
| 258 <dl><dt><a name="MemoryCacheHTTPRequestHandler-log_error"><strong>log_error</str
ong></a>(self, format, *args)</dt><dd><tt>Log an error.<br> |
| 259 <br> |
| 260 This is called when a request cannot be
fulfilled. By<br> |
| 261 default it passes the message on to <a href="
#MemoryCacheHTTPRequestHandler-log_message">log_message</a>().<br> |
| 262 <br> |
| 263 Arguments are the same as for <a href="#MemoryCach
eHTTPRequestHandler-log_message">log_message</a>().<br> |
| 264 <br> |
| 265 XXX This should go to the separate error 
;log.</tt></dd></dl> |
| 266 |
| 267 <dl><dt><a name="MemoryCacheHTTPRequestHandler-log_message"><strong>log_message<
/strong></a>(self, format, *args)</dt><dd><tt>Log an arbitrary me
ssage.<br> |
| 268 <br> |
| 269 This is used by all other logging functions.&
nbsp; Override<br> |
| 270 it if you have specific logging wishes.<br> |
| 271 <br> |
| 272 The first argument, FORMAT, is a format strin
g for the<br> |
| 273 message to be logged. If the format str
ing contains<br> |
| 274 any % escapes requiring parameters, they should&nb
sp;be<br> |
| 275 specified as subsequent arguments (it's just like<
br> |
| 276 printf!).<br> |
| 277 <br> |
| 278 The client host and current date/time are pre
fixed to<br> |
| 279 every message.</tt></dd></dl> |
| 280 |
| 281 <dl><dt><a name="MemoryCacheHTTPRequestHandler-log_request"><strong>log_request<
/strong></a>(self, code<font color="#909090">='-'</font>, size<font color="#9090
90">='-'</font>)</dt><dd><tt>Log an accepted request.<br> |
| 282 <br> |
| 283 This is called by <a href="#MemoryCacheHTTPRequestHandler-se
nd_response">send_response</a>().</tt></dd></dl> |
| 284 |
| 285 <dl><dt><a name="MemoryCacheHTTPRequestHandler-parse_request"><strong>parse_requ
est</strong></a>(self)</dt><dd><tt>Parse a request (internal).<br
> |
| 286 <br> |
| 287 The request should be stored in self.<strong>raw_r
equestline</strong>; the results<br> |
| 288 are in self.<strong>command</strong>, self.<strong>path</strong>,
self.<strong>request_version</strong> and<br> |
| 289 self.<strong>headers</strong>.<br> |
| 290 <br> |
| 291 Return True for success, False for failure; o
n failure, an<br> |
| 292 error is sent back.</tt></dd></dl> |
| 293 |
| 294 <dl><dt><a name="MemoryCacheHTTPRequestHandler-send_error"><strong>send_error</s
trong></a>(self, code, message<font color="#909090">=None</font>)</dt><dd><tt>Se
nd and log an error reply.<br> |
| 295 <br> |
| 296 Arguments are the error code, and a detailed&
nbsp;message.<br> |
| 297 The detailed message defaults to the short en
try matching the<br> |
| 298 response code.<br> |
| 299 <br> |
| 300 This sends an error response (so it must 
;be called before any<br> |
| 301 output has been generated), logs the error, a
nd finally sends<br> |
| 302 a piece of HTML explaining the error to
the user.</tt></dd></dl> |
| 303 |
| 304 <dl><dt><a name="MemoryCacheHTTPRequestHandler-send_header"><strong>send_header<
/strong></a>(self, keyword, value)</dt><dd><tt>Send a MIME header
.</tt></dd></dl> |
| 305 |
| 306 <dl><dt><a name="MemoryCacheHTTPRequestHandler-send_response"><strong>send_respo
nse</strong></a>(self, code, message<font color="#909090">=None</font>)</dt><dd>
<tt>Send the response header and log the resp
onse code.<br> |
| 307 <br> |
| 308 Also send two standard headers with the serve
r software<br> |
| 309 version and the current date.</tt></dd></dl> |
| 310 |
| 311 <dl><dt><a name="MemoryCacheHTTPRequestHandler-version_string"><strong>version_s
tring</strong></a>(self)</dt><dd><tt>Return the server software&n
bsp;version string.</tt></dd></dl> |
| 312 |
| 313 <hr> |
| 314 Data and other attributes inherited from <a href="BaseHTTPServer.html#BaseHTTPRe
questHandler">BaseHTTPServer.BaseHTTPRequestHandler</a>:<br> |
| 315 <dl><dt><strong>MessageClass</strong> = <class mimetools.Message></dl> |
| 316 |
| 317 <dl><dt><strong>default_request_version</strong> = 'HTTP/0.9'</dl> |
| 318 |
| 319 <dl><dt><strong>error_content_type</strong> = 'text/html'</dl> |
| 320 |
| 321 <dl><dt><strong>error_message_format</strong> = '<head><font color="#c040c
0">\n</font><title>Error response</title><font color="#c040c0">\n</f
ont></head><font color="#c040c0">\n</font><bo...ode explanation: %(code
)s = %(explain)s.<font color="#c040c0">\n</font></body><font color="#c040c
0">\n</font>'</dl> |
| 322 |
| 323 <dl><dt><strong>monthname</strong> = [None, 'Jan', 'Feb', 'Mar', 'Apr', 'May', '
Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']</dl> |
| 324 |
| 325 <dl><dt><strong>protocol_version</strong> = 'HTTP/1.0'</dl> |
| 326 |
| 327 <dl><dt><strong>responses</strong> = {100: ('Continue', 'Request received, pleas
e continue'), 101: ('Switching Protocols', 'Switching to new protocol; obey Upgr
ade header'), 200: ('OK', 'Request fulfilled, document follows'), 201: ('Created
', 'Document created, URL follows'), 202: ('Accepted', 'Request accepted, proces
sing continues off-line'), 203: ('Non-Authoritative Information', 'Request fulfi
lled from cache'), 204: ('No Content', 'Request fulfilled, nothing follows'), 20
5: ('Reset Content', 'Clear input form for further input.'), 206: ('Partial Cont
ent', 'Partial content follows.'), 300: ('Multiple Choices', 'Object has several
resources -- see URI list'), ...}</dl> |
| 328 |
| 329 <dl><dt><strong>sys_version</strong> = 'Python/2.7.2'</dl> |
| 330 |
| 331 <dl><dt><strong>weekdayname</strong> = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'
, 'Sun']</dl> |
| 332 |
| 333 <hr> |
| 334 Methods inherited from <a href="SocketServer.html#StreamRequestHandler">SocketSe
rver.StreamRequestHandler</a>:<br> |
| 335 <dl><dt><a name="MemoryCacheHTTPRequestHandler-finish"><strong>finish</strong></
a>(self)</dt></dl> |
| 336 |
| 337 <dl><dt><a name="MemoryCacheHTTPRequestHandler-setup"><strong>setup</strong></a>
(self)</dt></dl> |
| 338 |
| 339 <hr> |
| 340 Data and other attributes inherited from <a href="SocketServer.html#StreamReques
tHandler">SocketServer.StreamRequestHandler</a>:<br> |
| 341 <dl><dt><strong>disable_nagle_algorithm</strong> = False</dl> |
| 342 |
| 343 <dl><dt><strong>rbufsize</strong> = -1</dl> |
| 344 |
| 345 <dl><dt><strong>timeout</strong> = None</dl> |
| 346 |
| 347 <dl><dt><strong>wbufsize</strong> = 0</dl> |
| 348 |
| 349 <hr> |
| 350 Methods inherited from <a href="SocketServer.html#BaseRequestHandler">SocketServ
er.BaseRequestHandler</a>:<br> |
| 351 <dl><dt><a name="MemoryCacheHTTPRequestHandler-__init__"><strong>__init__</stron
g></a>(self, request, client_address, server)</dt></dl> |
| 352 |
| 353 </td></tr></table> <p> |
| 354 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 355 <tr bgcolor="#ffc8d8"> |
| 356 <td colspan=3 valign=bottom> <br> |
| 357 <font color="#000000" face="helvetica, arial"><a name="MemoryCacheHTTPServer">cl
ass <strong>MemoryCacheHTTPServer</strong></a>(<a href="SocketServer.html#Thread
ingMixIn">SocketServer.ThreadingMixIn</a>, <a href="BaseHTTPServer.html#HTTPServ
er">BaseHTTPServer.HTTPServer</a>)</font></td></tr> |
| 358 |
| 359 <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> |
| 360 <td width="100%"><dl><dt>Method resolution order:</dt> |
| 361 <dd><a href="telemetry.core.memory_cache_http_server.html#MemoryCacheHTTPServer"
>MemoryCacheHTTPServer</a></dd> |
| 362 <dd><a href="SocketServer.html#ThreadingMixIn">SocketServer.ThreadingMixIn</a></
dd> |
| 363 <dd><a href="BaseHTTPServer.html#HTTPServer">BaseHTTPServer.HTTPServer</a></dd> |
| 364 <dd><a href="SocketServer.html#TCPServer">SocketServer.TCPServer</a></dd> |
| 365 <dd><a href="SocketServer.html#BaseServer">SocketServer.BaseServer</a></dd> |
| 366 </dl> |
| 367 <hr> |
| 368 Methods defined here:<br> |
| 369 <dl><dt><a name="MemoryCacheHTTPServer-AddDirectoryToResourceMap"><strong>AddDir
ectoryToResourceMap</strong></a>(self, cwd)</dt><dd><tt>Loads all file
s in cwd into the in-memory resource map.</tt
></dd></dl> |
| 370 |
| 371 <dl><dt><a name="MemoryCacheHTTPServer-AddFileToResourceMap"><strong>AddFileToRe
sourceMap</strong></a>(self, file_path)</dt><dd><tt>Loads file_path in
to the in-memory resource map.</tt></dd></dl> |
| 372 |
| 373 <dl><dt><a name="MemoryCacheHTTPServer-__init__"><strong>__init__</strong></a>(s
elf, host_port, handler, paths)</dt></dl> |
| 374 |
| 375 <hr> |
| 376 Data and other attributes defined here:<br> |
| 377 <dl><dt><strong>request_queue_size</strong> = 128</dl> |
| 378 |
| 379 <hr> |
| 380 Methods inherited from <a href="SocketServer.html#ThreadingMixIn">SocketServer.T
hreadingMixIn</a>:<br> |
| 381 <dl><dt><a name="MemoryCacheHTTPServer-process_request"><strong>process_request<
/strong></a>(self, request, client_address)</dt><dd><tt>Start a new&nb
sp;thread to process the request.</tt></dd></dl> |
| 382 |
| 383 <dl><dt><a name="MemoryCacheHTTPServer-process_request_thread"><strong>process_r
equest_thread</strong></a>(self, request, client_address)</dt><dd><tt>Same
as in BaseServer but as a thread.<br> |
| 384 <br> |
| 385 In addition, exception handling is done here.</tt>
</dd></dl> |
| 386 |
| 387 <hr> |
| 388 Data and other attributes inherited from <a href="SocketServer.html#ThreadingMix
In">SocketServer.ThreadingMixIn</a>:<br> |
| 389 <dl><dt><strong>daemon_threads</strong> = False</dl> |
| 390 |
| 391 <hr> |
| 392 Methods inherited from <a href="BaseHTTPServer.html#HTTPServer">BaseHTTPServer.H
TTPServer</a>:<br> |
| 393 <dl><dt><a name="MemoryCacheHTTPServer-server_bind"><strong>server_bind</strong>
</a>(self)</dt><dd><tt>Override server_bind to store the&nbs
p;server name.</tt></dd></dl> |
| 394 |
| 395 <hr> |
| 396 Data and other attributes inherited from <a href="BaseHTTPServer.html#HTTPServer
">BaseHTTPServer.HTTPServer</a>:<br> |
| 397 <dl><dt><strong>allow_reuse_address</strong> = 1</dl> |
| 398 |
| 399 <hr> |
| 400 Methods inherited from <a href="SocketServer.html#TCPServer">SocketServer.TCPSer
ver</a>:<br> |
| 401 <dl><dt><a name="MemoryCacheHTTPServer-close_request"><strong>close_request</str
ong></a>(self, request)</dt><dd><tt>Called to clean up an&nb
sp;individual request.</tt></dd></dl> |
| 402 |
| 403 <dl><dt><a name="MemoryCacheHTTPServer-fileno"><strong>fileno</strong></a>(self)
</dt><dd><tt>Return socket file number.<br> |
| 404 <br> |
| 405 Interface required by select().</tt></dd></dl> |
| 406 |
| 407 <dl><dt><a name="MemoryCacheHTTPServer-get_request"><strong>get_request</strong>
</a>(self)</dt><dd><tt>Get the request and client addre
ss from the socket.<br> |
| 408 <br> |
| 409 May be overridden.</tt></dd></dl> |
| 410 |
| 411 <dl><dt><a name="MemoryCacheHTTPServer-server_activate"><strong>server_activate<
/strong></a>(self)</dt><dd><tt>Called by constructor to acti
vate the server.<br> |
| 412 <br> |
| 413 May be overridden.</tt></dd></dl> |
| 414 |
| 415 <dl><dt><a name="MemoryCacheHTTPServer-server_close"><strong>server_close</stron
g></a>(self)</dt><dd><tt>Called to clean-up the server.<br> |
| 416 <br> |
| 417 May be overridden.</tt></dd></dl> |
| 418 |
| 419 <dl><dt><a name="MemoryCacheHTTPServer-shutdown_request"><strong>shutdown_reques
t</strong></a>(self, request)</dt><dd><tt>Called to shutdown and&
nbsp;close an individual request.</tt></dd></dl> |
| 420 |
| 421 <hr> |
| 422 Data and other attributes inherited from <a href="SocketServer.html#TCPServer">S
ocketServer.TCPServer</a>:<br> |
| 423 <dl><dt><strong>address_family</strong> = 2</dl> |
| 424 |
| 425 <dl><dt><strong>socket_type</strong> = 1</dl> |
| 426 |
| 427 <hr> |
| 428 Methods inherited from <a href="SocketServer.html#BaseServer">SocketServer.BaseS
erver</a>:<br> |
| 429 <dl><dt><a name="MemoryCacheHTTPServer-finish_request"><strong>finish_request</s
trong></a>(self, request, client_address)</dt><dd><tt>Finish one reque
st by instantiating RequestHandlerClass.</tt></dd></dl> |
| 430 |
| 431 <dl><dt><a name="MemoryCacheHTTPServer-handle_error"><strong>handle_error</stron
g></a>(self, request, client_address)</dt><dd><tt>Handle an error 
;gracefully. May be overridden.<br> |
| 432 <br> |
| 433 The default is to print a traceback and
continue.</tt></dd></dl> |
| 434 |
| 435 <dl><dt><a name="MemoryCacheHTTPServer-handle_request"><strong>handle_request</s
trong></a>(self)</dt><dd><tt>Handle one request, possibly bl
ocking.<br> |
| 436 <br> |
| 437 Respects self.<strong>timeout</strong>.</tt></dd></dl> |
| 438 |
| 439 <dl><dt><a name="MemoryCacheHTTPServer-handle_timeout"><strong>handle_timeout</s
trong></a>(self)</dt><dd><tt>Called if no new request a
rrives within self.<strong>timeout</strong>.<br> |
| 440 <br> |
| 441 Overridden by ForkingMixIn.</tt></dd></dl> |
| 442 |
| 443 <dl><dt><a name="MemoryCacheHTTPServer-serve_forever"><strong>serve_forever</str
ong></a>(self, poll_interval<font color="#909090">=0.5</font>)</dt><dd><tt>Handl
e one request at a time until shutdown.<br> |
| 444 <br> |
| 445 Polls for shutdown every poll_interval seconds. Ig
nores<br> |
| 446 self.<strong>timeout</strong>. If you need to do p
eriodic tasks, do them in<br> |
| 447 another thread.</tt></dd></dl> |
| 448 |
| 449 <dl><dt><a name="MemoryCacheHTTPServer-shutdown"><strong>shutdown</strong></a>(s
elf)</dt><dd><tt>Stops the serve_forever loop.<br> |
| 450 <br> |
| 451 Blocks until the loop has finished. This must
be called while<br> |
| 452 <a href="#MemoryCacheHTTPServer-serve_forever">serve_forever</a>() is
running in another thread, or it will<br> |
| 453 deadlock.</tt></dd></dl> |
| 454 |
| 455 <dl><dt><a name="MemoryCacheHTTPServer-verify_request"><strong>verify_request</s
trong></a>(self, request, client_address)</dt><dd><tt>Verify the reque
st. May be overridden.<br> |
| 456 <br> |
| 457 Return True if we should proceed with this&nb
sp;request.</tt></dd></dl> |
| 458 |
| 459 <hr> |
| 460 Data and other attributes inherited from <a href="SocketServer.html#BaseServer">
SocketServer.BaseServer</a>:<br> |
| 461 <dl><dt><strong>timeout</strong> = None</dl> |
| 462 |
| 463 </td></tr></table> <p> |
| 464 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 465 <tr bgcolor="#ffc8d8"> |
| 466 <td colspan=3 valign=bottom> <br> |
| 467 <font color="#000000" face="helvetica, arial"><a name="ResourceAndRange">class <
strong>ResourceAndRange</strong></a>(<a href="__builtin__.html#tuple">__builtin_
_.tuple</a>)</font></td></tr> |
| 468 |
| 469 <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| 470 <td colspan=2><tt><a href="#ResourceAndRange">ResourceAndRange</a>(resource,&nbs
p;byte_range)<br> </tt></td></tr> |
| 471 <tr><td> </td> |
| 472 <td width="100%"><dl><dt>Method resolution order:</dt> |
| 473 <dd><a href="telemetry.core.memory_cache_http_server.html#ResourceAndRange">Reso
urceAndRange</a></dd> |
| 474 <dd><a href="__builtin__.html#tuple">__builtin__.tuple</a></dd> |
| 475 <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
| 476 </dl> |
| 477 <hr> |
| 478 Methods defined here:<br> |
| 479 <dl><dt><a name="ResourceAndRange-__getnewargs__"><strong>__getnewargs__</strong
></a>(self)</dt><dd><tt>Return self as a plain <a href=
"__builtin__.html#tuple">tuple</a>. Used by copy and&n
bsp;pickle.</tt></dd></dl> |
| 480 |
| 481 <dl><dt><a name="ResourceAndRange-__repr__"><strong>__repr__</strong></a>(self)<
/dt><dd><tt>Return a nicely formatted representation st
ring</tt></dd></dl> |
| 482 |
| 483 <dl><dt><a name="ResourceAndRange-_asdict"><strong>_asdict</strong></a>(self)</d
t><dd><tt>Return a new OrderedDict which maps fiel
d names to their values</tt></dd></dl> |
| 484 |
| 485 <dl><dt><a name="ResourceAndRange-_replace"><strong>_replace</strong></a>(_self,
**kwds)</dt><dd><tt>Return a new <a href="#ResourceAndRange">Res
ourceAndRange</a> object replacing specified fields wit
h new values</tt></dd></dl> |
| 486 |
| 487 <hr> |
| 488 Class methods defined here:<br> |
| 489 <dl><dt><a name="ResourceAndRange-_make"><strong>_make</strong></a>(cls, iterabl
e, new<font color="#909090">=<built-in method __new__ of type object></fon
t>, len<font color="#909090">=<built-in function len></font>)<font color="
#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__b
uiltin__.type</a></font></font></dt><dd><tt>Make a new <a href="#
ResourceAndRange">ResourceAndRange</a> object from a sequenc
e or iterable</tt></dd></dl> |
| 490 |
| 491 <hr> |
| 492 Static methods defined here:<br> |
| 493 <dl><dt><a name="ResourceAndRange-__new__"><strong>__new__</strong></a>(_cls, re
source, byte_range)</dt><dd><tt>Create new instance of <a hr
ef="#ResourceAndRange">ResourceAndRange</a>(resource, byte_range)</tt></dd>
</dl> |
| 494 |
| 495 <hr> |
| 496 Data descriptors defined here:<br> |
| 497 <dl><dt><strong>byte_range</strong></dt> |
| 498 <dd><tt>Alias for field number 1</tt></dd> |
| 499 </dl> |
| 500 <dl><dt><strong>resource</strong></dt> |
| 501 <dd><tt>Alias for field number 0</tt></dd> |
| 502 </dl> |
| 503 <hr> |
| 504 Data and other attributes defined here:<br> |
| 505 <dl><dt><strong>_fields</strong> = ('resource', 'byte_range')</dl> |
| 506 |
| 507 <hr> |
| 508 Methods inherited from <a href="__builtin__.html#tuple">__builtin__.tuple</a>:<b
r> |
| 509 <dl><dt><a name="ResourceAndRange-__add__"><strong>__add__</strong></a>(...)</dt
><dd><tt>x.<a href="#ResourceAndRange-__add__">__add__</a>(y) <==>&nb
sp;x+y</tt></dd></dl> |
| 510 |
| 511 <dl><dt><a name="ResourceAndRange-__contains__"><strong>__contains__</strong></a
>(...)</dt><dd><tt>x.<a href="#ResourceAndRange-__contains__">__contains__</a>(y
) <==> y in x</tt></dd></dl> |
| 512 |
| 513 <dl><dt><a name="ResourceAndRange-__eq__"><strong>__eq__</strong></a>(...)</dt><
dd><tt>x.<a href="#ResourceAndRange-__eq__">__eq__</a>(y) <==> x
==y</tt></dd></dl> |
| 514 |
| 515 <dl><dt><a name="ResourceAndRange-__ge__"><strong>__ge__</strong></a>(...)</dt><
dd><tt>x.<a href="#ResourceAndRange-__ge__">__ge__</a>(y) <==> x
>=y</tt></dd></dl> |
| 516 |
| 517 <dl><dt><a name="ResourceAndRange-__getattribute__"><strong>__getattribute__</st
rong></a>(...)</dt><dd><tt>x.<a href="#ResourceAndRange-__getattribute__">__geta
ttribute__</a>('name') <==> x.name</tt></dd></dl> |
| 518 |
| 519 <dl><dt><a name="ResourceAndRange-__getitem__"><strong>__getitem__</strong></a>(
...)</dt><dd><tt>x.<a href="#ResourceAndRange-__getitem__">__getitem__</a>(y)&nb
sp;<==> x[y]</tt></dd></dl> |
| 520 |
| 521 <dl><dt><a name="ResourceAndRange-__getslice__"><strong>__getslice__</strong></a
>(...)</dt><dd><tt>x.<a href="#ResourceAndRange-__getslice__">__getslice__</a>(i
, j) <==> x[i:j]<br> |
| 522 <br> |
| 523 Use of negative indices is not supported.</tt></dd
></dl> |
| 524 |
| 525 <dl><dt><a name="ResourceAndRange-__gt__"><strong>__gt__</strong></a>(...)</dt><
dd><tt>x.<a href="#ResourceAndRange-__gt__">__gt__</a>(y) <==> x
>y</tt></dd></dl> |
| 526 |
| 527 <dl><dt><a name="ResourceAndRange-__hash__"><strong>__hash__</strong></a>(...)</
dt><dd><tt>x.<a href="#ResourceAndRange-__hash__">__hash__</a>() <==>
hash(x)</tt></dd></dl> |
| 528 |
| 529 <dl><dt><a name="ResourceAndRange-__iter__"><strong>__iter__</strong></a>(...)</
dt><dd><tt>x.<a href="#ResourceAndRange-__iter__">__iter__</a>() <==>
iter(x)</tt></dd></dl> |
| 530 |
| 531 <dl><dt><a name="ResourceAndRange-__le__"><strong>__le__</strong></a>(...)</dt><
dd><tt>x.<a href="#ResourceAndRange-__le__">__le__</a>(y) <==> x
<=y</tt></dd></dl> |
| 532 |
| 533 <dl><dt><a name="ResourceAndRange-__len__"><strong>__len__</strong></a>(...)</dt
><dd><tt>x.<a href="#ResourceAndRange-__len__">__len__</a>() <==>&nbs
p;len(x)</tt></dd></dl> |
| 534 |
| 535 <dl><dt><a name="ResourceAndRange-__lt__"><strong>__lt__</strong></a>(...)</dt><
dd><tt>x.<a href="#ResourceAndRange-__lt__">__lt__</a>(y) <==> x
<y</tt></dd></dl> |
| 536 |
| 537 <dl><dt><a name="ResourceAndRange-__mul__"><strong>__mul__</strong></a>(...)</dt
><dd><tt>x.<a href="#ResourceAndRange-__mul__">__mul__</a>(n) <==>&nb
sp;x*n</tt></dd></dl> |
| 538 |
| 539 <dl><dt><a name="ResourceAndRange-__ne__"><strong>__ne__</strong></a>(...)</dt><
dd><tt>x.<a href="#ResourceAndRange-__ne__">__ne__</a>(y) <==> x
!=y</tt></dd></dl> |
| 540 |
| 541 <dl><dt><a name="ResourceAndRange-__rmul__"><strong>__rmul__</strong></a>(...)</
dt><dd><tt>x.<a href="#ResourceAndRange-__rmul__">__rmul__</a>(n) <==>
; n*x</tt></dd></dl> |
| 542 |
| 543 <dl><dt><a name="ResourceAndRange-__sizeof__"><strong>__sizeof__</strong></a>(..
.)</dt><dd><tt>T.<a href="#ResourceAndRange-__sizeof__">__sizeof__</a>() --
size of T in memory, in bytes</tt></dd></dl> |
| 544 |
| 545 <dl><dt><a name="ResourceAndRange-count"><strong>count</strong></a>(...)</dt><dd
><tt>T.<a href="#ResourceAndRange-count">count</a>(value) -> intege
r -- return number of occurrences of value</t
t></dd></dl> |
| 546 |
| 547 <dl><dt><a name="ResourceAndRange-index"><strong>index</strong></a>(...)</dt><dd
><tt>T.<a href="#ResourceAndRange-index">index</a>(value, [start, [sto
p]]) -> integer -- return first index of&n
bsp;value.<br> |
| 548 Raises ValueError if the value is not present
.</tt></dd></dl> |
| 549 |
| 550 </td></tr></table></td></tr></table><p> |
| 551 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 552 <tr bgcolor="#eeaa77"> |
| 553 <td colspan=3 valign=bottom> <br> |
| 554 <font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></b
ig></font></td></tr> |
| 555 |
| 556 <tr><td bgcolor="#eeaa77"><tt> </tt></td><td>
</td> |
| 557 <td width="100%"><dl><dt><a name="-Main"><strong>Main</strong></a>()</dt></dl> |
| 558 </td></tr></table> |
| 559 </body></html> |
| OLD | NEW |