|
1 <?xml version="1.0" encoding="ascii"?> |
|
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
|
3 "DTD/xhtml1-transitional.dtd"> |
|
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
|
5 <head> |
|
6 <title>configuration.Configuration</title> |
|
7 <link rel="stylesheet" href="epydoc.css" type="text/css" /> |
|
8 <script type="text/javascript" src="epydoc.js"></script> |
|
9 </head> |
|
10 |
|
11 <body bgcolor="white" text="black" link="blue" vlink="#204080" |
|
12 alink="#204080"> |
|
13 <!-- ==================== NAVIGATION BAR ==================== --> |
|
14 <table class="navbar" border="0" width="100%" cellpadding="0" |
|
15 bgcolor="#a0c0ff" cellspacing="0"> |
|
16 <tr valign="middle"> |
|
17 |
|
18 <!-- Tree link --> |
|
19 <th> <a |
|
20 href="module-tree.html">Trees</a> </th> |
|
21 |
|
22 <!-- Index link --> |
|
23 <th> <a |
|
24 href="identifier-index.html">Indices</a> </th> |
|
25 |
|
26 <!-- Help link --> |
|
27 <th> <a |
|
28 href="help.html">Help</a> </th> |
|
29 |
|
30 <th class="navbar" width="100%"></th> |
|
31 </tr> |
|
32 </table> |
|
33 <table width="100%" cellpadding="0" cellspacing="0"> |
|
34 <tr valign="top"> |
|
35 <td width="100%"> |
|
36 <span class="breadcrumbs"> |
|
37 <a href="configuration-module.html">Module configuration</a> :: |
|
38 Class Configuration |
|
39 </span> |
|
40 </td> |
|
41 <td> |
|
42 <table cellpadding="0" cellspacing="0"> |
|
43 <!-- hide/show private --> |
|
44 <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink" |
|
45 onclick="toggle_private();">hide private</a>]</span></td></tr> |
|
46 <tr><td align="right"><span class="options" |
|
47 >[<a href="frames.html" target="_top">frames</a |
|
48 >] | <a href="configuration.Configuration-class.html" |
|
49 target="_top">no frames</a>]</span></td></tr> |
|
50 </table> |
|
51 </td> |
|
52 </tr> |
|
53 </table> |
|
54 <!-- ==================== CLASS DESCRIPTION ==================== --> |
|
55 <h1 class="epydoc">Class Configuration</h1><span class="codelink"><a href="configuration-pysrc.html#Configuration">source code</a></span><br /><br /> |
|
56 <pre class="base-tree"> |
|
57 object --+ |
|
58 | |
|
59 UserDict.DictMixin --+ |
|
60 | |
|
61 <strong class="uidshort">Configuration</strong> |
|
62 </pre> |
|
63 |
|
64 <hr /> |
|
65 Base Configuration objects.<br /><br /> |
|
66 |
|
67 <!-- ==================== INSTANCE METHODS ==================== --> |
|
68 <a name="section-InstanceMethods"></a> |
|
69 <table class="summary" border="1" cellpadding="3" |
|
70 cellspacing="0" width="100%" bgcolor="white"> |
|
71 <tr bgcolor="#70b0f0" class="table-header"> |
|
72 <td colspan="2" class="table-header"> |
|
73 <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
|
74 <tr valign="top"> |
|
75 <td align="left"><span class="table-header">Instance Methods</span></td> |
|
76 <td align="right" valign="top" |
|
77 ><span class="options">[<a href="#section-InstanceMethods" |
|
78 class="privatelink" onclick="toggle_private();" |
|
79 >hide private</a>]</span></td> |
|
80 </tr> |
|
81 </table> |
|
82 </td> |
|
83 </tr> |
|
84 <tr> |
|
85 <td width="15%" align="right" valign="top" class="summary"> |
|
86 <span class="summary-type"> </span> |
|
87 </td><td class="summary"> |
|
88 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
89 <tr> |
|
90 <td><span class="summary-sig"><a href="configuration.Configuration-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>, |
|
91 <span class="summary-sig-arg">data</span>=<span class="summary-sig-default">None</span>)</span><br /> |
|
92 Initialization.</td> |
|
93 <td align="right" valign="top"> |
|
94 <span class="codelink"><a href="configuration-pysrc.html#Configuration.__init__">source code</a></span> |
|
95 |
|
96 </td> |
|
97 </tr> |
|
98 </table> |
|
99 |
|
100 </td> |
|
101 </tr> |
|
102 <tr> |
|
103 <td width="15%" align="right" valign="top" class="summary"> |
|
104 <span class="summary-type"> </span> |
|
105 </td><td class="summary"> |
|
106 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
107 <tr> |
|
108 <td><span class="summary-sig"><a name="__getitem__"></a><span class="summary-sig-name">__getitem__</span>(<span class="summary-sig-arg">self</span>, |
|
109 <span class="summary-sig-arg">key</span>, |
|
110 <span class="summary-sig-arg">interpolate</span>=<span class="summary-sig-default">True</span>)</span><br /> |
|
111 Get an item from the configuration via dictionary interface.</td> |
|
112 <td align="right" valign="top"> |
|
113 <span class="codelink"><a href="configuration-pysrc.html#Configuration.__getitem__">source code</a></span> |
|
114 |
|
115 </td> |
|
116 </tr> |
|
117 </table> |
|
118 |
|
119 </td> |
|
120 </tr> |
|
121 <tr> |
|
122 <td width="15%" align="right" valign="top" class="summary"> |
|
123 <span class="summary-type"> </span> |
|
124 </td><td class="summary"> |
|
125 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
126 <tr> |
|
127 <td><span class="summary-sig"><a name="__setitem__"></a><span class="summary-sig-name">__setitem__</span>(<span class="summary-sig-arg">self</span>, |
|
128 <span class="summary-sig-arg">key</span>, |
|
129 <span class="summary-sig-arg">item</span>)</span><br /> |
|
130 Set an item from the configuration via dictionary interface.</td> |
|
131 <td align="right" valign="top"> |
|
132 <span class="codelink"><a href="configuration-pysrc.html#Configuration.__setitem__">source code</a></span> |
|
133 |
|
134 </td> |
|
135 </tr> |
|
136 </table> |
|
137 |
|
138 </td> |
|
139 </tr> |
|
140 <tr> |
|
141 <td width="15%" align="right" valign="top" class="summary"> |
|
142 <span class="summary-type"> </span> |
|
143 </td><td class="summary"> |
|
144 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
145 <tr> |
|
146 <td><span class="summary-sig"><a name="__delitem__"></a><span class="summary-sig-name">__delitem__</span>(<span class="summary-sig-arg">self</span>, |
|
147 <span class="summary-sig-arg">key</span>)</span><br /> |
|
148 Remove an item from the configuration via dictionary interface.</td> |
|
149 <td align="right" valign="top"> |
|
150 <span class="codelink"><a href="configuration-pysrc.html#Configuration.__delitem__">source code</a></span> |
|
151 |
|
152 </td> |
|
153 </tr> |
|
154 </table> |
|
155 |
|
156 </td> |
|
157 </tr> |
|
158 <tr> |
|
159 <td width="15%" align="right" valign="top" class="summary"> |
|
160 <span class="summary-type"> </span> |
|
161 </td><td class="summary"> |
|
162 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
163 <tr> |
|
164 <td><span class="summary-sig"><a name="keys"></a><span class="summary-sig-name">keys</span>(<span class="summary-sig-arg">self</span>)</span><br /> |
|
165 Get the list of item keys.</td> |
|
166 <td align="right" valign="top"> |
|
167 <span class="codelink"><a href="configuration-pysrc.html#Configuration.keys">source code</a></span> |
|
168 |
|
169 </td> |
|
170 </tr> |
|
171 </table> |
|
172 |
|
173 </td> |
|
174 </tr> |
|
175 <tr> |
|
176 <td width="15%" align="right" valign="top" class="summary"> |
|
177 <span class="summary-type"> </span> |
|
178 </td><td class="summary"> |
|
179 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
180 <tr> |
|
181 <td><span class="summary-sig"><a name="match_name"></a><span class="summary-sig-name">match_name</span>(<span class="summary-sig-arg">self</span>, |
|
182 <span class="summary-sig-arg">name</span>)</span><br /> |
|
183 See if the given name matches the name of this configuration.</td> |
|
184 <td align="right" valign="top"> |
|
185 <span class="codelink"><a href="configuration-pysrc.html#Configuration.match_name">source code</a></span> |
|
186 |
|
187 </td> |
|
188 </tr> |
|
189 </table> |
|
190 |
|
191 </td> |
|
192 </tr> |
|
193 <tr> |
|
194 <td width="15%" align="right" valign="top" class="summary"> |
|
195 <span class="summary-type"> </span> |
|
196 </td><td class="summary"> |
|
197 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
198 <tr> |
|
199 <td><span class="summary-sig"><a href="configuration.Configuration-class.html#get" class="summary-sig-name">get</a>(<span class="summary-sig-arg">self</span>, |
|
200 <span class="summary-sig-arg">key</span>, |
|
201 <span class="summary-sig-arg">default_value</span>)</span><br /> |
|
202 Get an item from the configuration.</td> |
|
203 <td align="right" valign="top"> |
|
204 <span class="codelink"><a href="configuration-pysrc.html#Configuration.get">source code</a></span> |
|
205 |
|
206 </td> |
|
207 </tr> |
|
208 </table> |
|
209 |
|
210 </td> |
|
211 </tr> |
|
212 <tr> |
|
213 <td width="15%" align="right" valign="top" class="summary"> |
|
214 <span class="summary-type"> </span> |
|
215 </td><td class="summary"> |
|
216 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
217 <tr> |
|
218 <td><span class="summary-sig"><a name="get_list"></a><span class="summary-sig-name">get_list</span>(<span class="summary-sig-arg">self</span>, |
|
219 <span class="summary-sig-arg">key</span>, |
|
220 <span class="summary-sig-arg">default_value</span>)</span></td> |
|
221 <td align="right" valign="top"> |
|
222 <span class="codelink"><a href="configuration-pysrc.html#Configuration.get_list">source code</a></span> |
|
223 |
|
224 </td> |
|
225 </tr> |
|
226 </table> |
|
227 |
|
228 </td> |
|
229 </tr> |
|
230 <tr> |
|
231 <td width="15%" align="right" valign="top" class="summary"> |
|
232 <span class="summary-type"> </span> |
|
233 </td><td class="summary"> |
|
234 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
235 <tr> |
|
236 <td><span class="summary-sig"><a name="get_int"></a><span class="summary-sig-name">get_int</span>(<span class="summary-sig-arg">self</span>, |
|
237 <span class="summary-sig-arg">key</span>, |
|
238 <span class="summary-sig-arg">default_value</span>)</span></td> |
|
239 <td align="right" valign="top"> |
|
240 <span class="codelink"><a href="configuration-pysrc.html#Configuration.get_int">source code</a></span> |
|
241 |
|
242 </td> |
|
243 </tr> |
|
244 </table> |
|
245 |
|
246 </td> |
|
247 </tr> |
|
248 <tr> |
|
249 <td width="15%" align="right" valign="top" class="summary"> |
|
250 <span class="summary-type"> </span> |
|
251 </td><td class="summary"> |
|
252 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
253 <tr> |
|
254 <td><span class="summary-sig"><a name="get_boolean"></a><span class="summary-sig-name">get_boolean</span>(<span class="summary-sig-arg">self</span>, |
|
255 <span class="summary-sig-arg">key</span>, |
|
256 <span class="summary-sig-arg">default_value</span>)</span></td> |
|
257 <td align="right" valign="top"> |
|
258 <span class="codelink"><a href="configuration-pysrc.html#Configuration.get_boolean">source code</a></span> |
|
259 |
|
260 </td> |
|
261 </tr> |
|
262 </table> |
|
263 |
|
264 </td> |
|
265 </tr> |
|
266 <tr> |
|
267 <td width="15%" align="right" valign="top" class="summary"> |
|
268 <span class="summary-type"> </span> |
|
269 </td><td class="summary"> |
|
270 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
271 <tr> |
|
272 <td><span class="summary-sig"><a name="interpolate"></a><span class="summary-sig-name">interpolate</span>(<span class="summary-sig-arg">self</span>, |
|
273 <span class="summary-sig-arg">value</span>)</span><br /> |
|
274 Search for patterns of the form '${..}' and insert matching values.</td> |
|
275 <td align="right" valign="top"> |
|
276 <span class="codelink"><a href="configuration-pysrc.html#Configuration.interpolate">source code</a></span> |
|
277 |
|
278 </td> |
|
279 </tr> |
|
280 </table> |
|
281 |
|
282 </td> |
|
283 </tr> |
|
284 <tr> |
|
285 <td width="15%" align="right" valign="top" class="summary"> |
|
286 <span class="summary-type"> </span> |
|
287 </td><td class="summary"> |
|
288 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
289 <tr> |
|
290 <td><span class="summary-sig"><a href="configuration.Configuration-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">self</span>)</span><br /> |
|
291 str(x)</td> |
|
292 <td align="right" valign="top"> |
|
293 <span class="codelink"><a href="configuration-pysrc.html#Configuration.__str__">source code</a></span> |
|
294 |
|
295 </td> |
|
296 </tr> |
|
297 </table> |
|
298 |
|
299 </td> |
|
300 </tr> |
|
301 <tr> |
|
302 <td colspan="2" class="summary"> |
|
303 <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: |
|
304 <code>__delattr__</code>, |
|
305 <code>__getattribute__</code>, |
|
306 <code>__hash__</code>, |
|
307 <code>__new__</code>, |
|
308 <code>__reduce__</code>, |
|
309 <code>__reduce_ex__</code>, |
|
310 <code>__repr__</code>, |
|
311 <code>__setattr__</code> |
|
312 </p> |
|
313 <p class="indent-wrapped-lines"><b>Inherited from <code>UserDict.DictMixin</code></b>: |
|
314 <code>__cmp__</code>, |
|
315 <code>__contains__</code>, |
|
316 <code>__iter__</code>, |
|
317 <code>__len__</code>, |
|
318 <code>clear</code>, |
|
319 <code>has_key</code>, |
|
320 <code>items</code>, |
|
321 <code>iteritems</code>, |
|
322 <code>iterkeys</code>, |
|
323 <code>itervalues</code>, |
|
324 <code>pop</code>, |
|
325 <code>popitem</code>, |
|
326 <code>setdefault</code>, |
|
327 <code>update</code>, |
|
328 <code>values</code> |
|
329 </p> |
|
330 </td> |
|
331 </tr> |
|
332 </table> |
|
333 <!-- ==================== CLASS VARIABLES ==================== --> |
|
334 <a name="section-ClassVariables"></a> |
|
335 <table class="summary" border="1" cellpadding="3" |
|
336 cellspacing="0" width="100%" bgcolor="white"> |
|
337 <tr bgcolor="#70b0f0" class="table-header"> |
|
338 <td colspan="2" class="table-header"> |
|
339 <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
|
340 <tr valign="top"> |
|
341 <td align="left"><span class="table-header">Class Variables</span></td> |
|
342 <td align="right" valign="top" |
|
343 ><span class="options">[<a href="#section-ClassVariables" |
|
344 class="privatelink" onclick="toggle_private();" |
|
345 >hide private</a>]</span></td> |
|
346 </tr> |
|
347 </table> |
|
348 </td> |
|
349 </tr> |
|
350 <tr> |
|
351 <td width="15%" align="right" valign="top" class="summary"> |
|
352 <span class="summary-type"> </span> |
|
353 </td><td class="summary"> |
|
354 <a name="key_re"></a><span class="summary-name">key_re</span> = <code title="re.compile(r'\${(?P<name>[._a-zA-Z0-9]+)}', re.M)">re.compile(r'\${(?P<name>[._a-zA-Z0-9]+)}', re.M)</code> |
|
355 </td> |
|
356 </tr> |
|
357 </table> |
|
358 <!-- ==================== PROPERTIES ==================== --> |
|
359 <a name="section-Properties"></a> |
|
360 <table class="summary" border="1" cellpadding="3" |
|
361 cellspacing="0" width="100%" bgcolor="white"> |
|
362 <tr bgcolor="#70b0f0" class="table-header"> |
|
363 <td colspan="2" class="table-header"> |
|
364 <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
|
365 <tr valign="top"> |
|
366 <td align="left"><span class="table-header">Properties</span></td> |
|
367 <td align="right" valign="top" |
|
368 ><span class="options">[<a href="#section-Properties" |
|
369 class="privatelink" onclick="toggle_private();" |
|
370 >hide private</a>]</span></td> |
|
371 </tr> |
|
372 </table> |
|
373 </td> |
|
374 </tr> |
|
375 <tr> |
|
376 <td colspan="2" class="summary"> |
|
377 <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: |
|
378 <code>__class__</code> |
|
379 </p> |
|
380 </td> |
|
381 </tr> |
|
382 </table> |
|
383 <!-- ==================== METHOD DETAILS ==================== --> |
|
384 <a name="section-MethodDetails"></a> |
|
385 <table class="details" border="1" cellpadding="3" |
|
386 cellspacing="0" width="100%" bgcolor="white"> |
|
387 <tr bgcolor="#70b0f0" class="table-header"> |
|
388 <td colspan="2" class="table-header"> |
|
389 <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
|
390 <tr valign="top"> |
|
391 <td align="left"><span class="table-header">Method Details</span></td> |
|
392 <td align="right" valign="top" |
|
393 ><span class="options">[<a href="#section-MethodDetails" |
|
394 class="privatelink" onclick="toggle_private();" |
|
395 >hide private</a>]</span></td> |
|
396 </tr> |
|
397 </table> |
|
398 </td> |
|
399 </tr> |
|
400 </table> |
|
401 <a name="__init__"></a> |
|
402 <div> |
|
403 <table class="details" border="1" cellpadding="3" |
|
404 cellspacing="0" width="100%" bgcolor="white"> |
|
405 <tr><td> |
|
406 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
407 <tr valign="top"><td> |
|
408 <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>, |
|
409 <span class="sig-arg">data</span>=<span class="sig-default">None</span>)</span> |
|
410 <br /><em class="fname">(Constructor)</em> |
|
411 </h3> |
|
412 </td><td align="right" valign="top" |
|
413 ><span class="codelink"><a href="configuration-pysrc.html#Configuration.__init__">source code</a></span> |
|
414 </td> |
|
415 </table> |
|
416 |
|
417 Initialization. |
|
418 <dl class="fields"> |
|
419 <dt>Overrides: |
|
420 object.__init__ |
|
421 </dt> |
|
422 </dl> |
|
423 </td></tr></table> |
|
424 </div> |
|
425 <a name="get"></a> |
|
426 <div> |
|
427 <table class="details" border="1" cellpadding="3" |
|
428 cellspacing="0" width="100%" bgcolor="white"> |
|
429 <tr><td> |
|
430 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
431 <tr valign="top"><td> |
|
432 <h3 class="epydoc"><span class="sig"><span class="sig-name">get</span>(<span class="sig-arg">self</span>, |
|
433 <span class="sig-arg">key</span>, |
|
434 <span class="sig-arg">default_value</span>)</span> |
|
435 </h3> |
|
436 </td><td align="right" valign="top" |
|
437 ><span class="codelink"><a href="configuration-pysrc.html#Configuration.get">source code</a></span> |
|
438 </td> |
|
439 </table> |
|
440 |
|
441 Get an item from the configuration. |
|
442 <dl class="fields"> |
|
443 <dt>Overrides: |
|
444 UserDict.DictMixin.get |
|
445 </dt> |
|
446 </dl> |
|
447 </td></tr></table> |
|
448 </div> |
|
449 <a name="__str__"></a> |
|
450 <div> |
|
451 <table class="details" border="1" cellpadding="3" |
|
452 cellspacing="0" width="100%" bgcolor="white"> |
|
453 <tr><td> |
|
454 <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
|
455 <tr valign="top"><td> |
|
456 <h3 class="epydoc"><span class="sig"><span class="sig-name">__str__</span>(<span class="sig-arg">self</span>)</span> |
|
457 <br /><em class="fname">(Informal representation operator)</em> |
|
458 </h3> |
|
459 </td><td align="right" valign="top" |
|
460 ><span class="codelink"><a href="configuration-pysrc.html#Configuration.__str__">source code</a></span> |
|
461 </td> |
|
462 </table> |
|
463 |
|
464 str(x) |
|
465 <dl class="fields"> |
|
466 <dt>Overrides: |
|
467 object.__str__ |
|
468 <dd><em class="note">(inherited documentation)</em></dd> |
|
469 </dt> |
|
470 </dl> |
|
471 </td></tr></table> |
|
472 </div> |
|
473 <br /> |
|
474 <!-- ==================== NAVIGATION BAR ==================== --> |
|
475 <table class="navbar" border="0" width="100%" cellpadding="0" |
|
476 bgcolor="#a0c0ff" cellspacing="0"> |
|
477 <tr valign="middle"> |
|
478 |
|
479 <!-- Tree link --> |
|
480 <th> <a |
|
481 href="module-tree.html">Trees</a> </th> |
|
482 |
|
483 <!-- Index link --> |
|
484 <th> <a |
|
485 href="identifier-index.html">Indices</a> </th> |
|
486 |
|
487 <!-- Help link --> |
|
488 <th> <a |
|
489 href="help.html">Help</a> </th> |
|
490 |
|
491 <th class="navbar" width="100%"></th> |
|
492 </tr> |
|
493 </table> |
|
494 <table border="0" cellpadding="0" cellspacing="0" width="100%%"> |
|
495 <tr> |
|
496 <td align="left" class="footer"> |
|
497 Generated by Epydoc 3.0beta1 on Wed Sep 09 13:44:18 2009 |
|
498 </td> |
|
499 <td align="right" class="footer"> |
|
500 <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a> |
|
501 </td> |
|
502 </tr> |
|
503 </table> |
|
504 |
|
505 <script type="text/javascript"> |
|
506 <!-- |
|
507 // Private objects are initially displayed (because if |
|
508 // javascript is turned off then we want them to be |
|
509 // visible); but by default, we want to hide them. So hide |
|
510 // them unless we have a cookie that says to show them. |
|
511 checkCookie() |
|
512 // --> |
|
513 </script> |
|
514 |
|
515 </body> |
|
516 </html> |