652 lines (497 with data), 51.9 kB
@header@
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="matplotlib.html"><font color="#ffffff">matplotlib</font></a>.cbook</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/jdhunter/dev/lib/python2.5/site-packages/matplotlib/cbook.py">/home/jdhunter/dev/lib/python2.5/site-packages/matplotlib/cbook.py</a></font></td></tr></table>
<p><tt>A collection of utility functions and classes. Many (but not all)<br>
from the Python Cookbook -- hence the name cbook</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom> <br>
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="StringIO.html">StringIO</a><br>
<a href="__builtin__.html">__builtin__</a><br>
<a href="errno.html">errno</a><br>
</td><td width="25%" valign=top><a href="itertools.html">itertools</a><br>
<a href="matplotlib.numerix.html">matplotlib.numerix</a><br>
<a href="os.html">os</a><br>
</td><td width="25%" valign=top><a href="re.html">re</a><br>
<a href="sys.html">sys</a><br>
<a href="traceback.html">traceback</a><br>
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="__builtin__.html#dict">__builtin__.dict</a>(<a href="__builtin__.html#object">__builtin__.object</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="matplotlib.cbook.html#Xlator">Xlator</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.cbook.html#maxdict">maxdict</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="__builtin__.html#list">__builtin__.list</a>(<a href="__builtin__.html#object">__builtin__.object</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="matplotlib.cbook.html#silent_list">silent_list</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="matplotlib.cbook.html#Bunch">Bunch</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.cbook.html#CallbackRegistry">CallbackRegistry</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.cbook.html#MemoryMonitor">MemoryMonitor</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.cbook.html#Null">Null</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.cbook.html#RingBuffer">RingBuffer</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.cbook.html#Sorter">Sorter</a>
</font></dt><dt><font face="helvetica, arial"><a href="matplotlib.cbook.html#Stack">Stack</a>
</font></dt></dl>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Bunch">class <strong>Bunch</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Often we want to just collect a bunch of stuff together, naming each<br>
item of the bunch; a dictionary's OK for that, but a small do- nothing<br>
class is even handier, and prettier to use. Whenever you want to<br>
group a few variables:<br>
<br>
>>> point = <a href="#Bunch">Bunch</a>(datum=2, squared=4, coord=12)<br>
>>> point.datum<br>
<br>
By: Alex Martelli<br>
From: <a href="http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52308">http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52308</a><br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Bunch-__init__"><strong>__init__</strong></a>(self, **kwds)</dt></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="CallbackRegistry">class <strong>CallbackRegistry</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Handle registering and disconnecting for a set of signals and<br>
callbacks<br>
<br>
signals = 'eat', 'drink', 'be merry'<br>
<br>
def oneat(x):<br>
print 'eat', x<br>
<br>
def ondrink(x):<br>
print 'drink', x<br>
<br>
callbacks = <a href="#CallbackRegistry">CallbackRegistry</a>(signals)<br>
<br>
ideat = callbacks.<a href="#CallbackRegistry-connect">connect</a>('eat', oneat)<br>
iddrink = callbacks.<a href="#CallbackRegistry-connect">connect</a>('drink', ondrink)<br>
<br>
#tmp = callbacks.<a href="#CallbackRegistry-connect">connect</a>('drunk', ondrink) # this will raise a ValueError<br>
<br>
callbacks.<a href="#CallbackRegistry-process">process</a>('drink', 123) # will call oneat<br>
callbacks.<a href="#CallbackRegistry-process">process</a>('eat', 456) # will call ondrink<br>
callbacks.<a href="#CallbackRegistry-process">process</a>('be merry', 456) # nothing will be called<br>
callbacks.<a href="#CallbackRegistry-disconnect">disconnect</a>(ideat) # disconnect oneat<br>
callbacks.<a href="#CallbackRegistry-process">process</a>('eat', 456) # nothing will be called<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="CallbackRegistry-__init__"><strong>__init__</strong></a>(self, signals)</dt><dd><tt>signals is a sequence of valid signals</tt></dd></dl>
<dl><dt><a name="CallbackRegistry-connect"><strong>connect</strong></a>(self, s, func)</dt><dd><tt>register func to be called when a signal s is generated<br>
func will be called with args and kwargs</tt></dd></dl>
<dl><dt><a name="CallbackRegistry-disconnect"><strong>disconnect</strong></a>(self, cid)</dt><dd><tt>disconnect the callback registered with callback id cid</tt></dd></dl>
<dl><dt><a name="CallbackRegistry-process"><strong>process</strong></a>(self, s, *args, **kwargs)</dt><dd><tt>process signal s. All of the functions registered to receive<br>
callbacks on s will be called with *args and **kwargs</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="MemoryMonitor">class <strong>MemoryMonitor</strong></a></font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="MemoryMonitor-__call__"><strong>__call__</strong></a>(self)</dt></dl>
<dl><dt><a name="MemoryMonitor-__init__"><strong>__init__</strong></a>(self, nmax<font color="#909090">=20000</font>)</dt></dl>
<dl><dt><a name="MemoryMonitor-clear"><strong>clear</strong></a>(self)</dt></dl>
<dl><dt><a name="MemoryMonitor-plot"><strong>plot</strong></a>(self, i0<font color="#909090">=0</font>, isub<font color="#909090">=1</font>)</dt></dl>
<dl><dt><a name="MemoryMonitor-report"><strong>report</strong></a>(self, segments<font color="#909090">=4</font>)</dt></dl>
<dl><dt><a name="MemoryMonitor-xy"><strong>xy</strong></a>(self, i0<font color="#909090">=0</font>, isub<font color="#909090">=1</font>)</dt></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Null">class <strong>Null</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt><a href="#Null">Null</a> objects always and reliably "do nothing."<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Null-__call__"><strong>__call__</strong></a>(self, *args, **kwargs)</dt></dl>
<dl><dt><a name="Null-__delattr__"><strong>__delattr__</strong></a>(self, name)</dt></dl>
<dl><dt><a name="Null-__getattr__"><strong>__getattr__</strong></a>(self, name)</dt></dl>
<dl><dt><a name="Null-__init__"><strong>__init__</strong></a>(self, *args, **kwargs)</dt></dl>
<dl><dt><a name="Null-__nonzero__"><strong>__nonzero__</strong></a>(self)</dt></dl>
<dl><dt><a name="Null-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
<dl><dt><a name="Null-__setattr__"><strong>__setattr__</strong></a>(self, name, value)</dt></dl>
<dl><dt><a name="Null-__str__"><strong>__str__</strong></a>(self)</dt></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="RingBuffer">class <strong>RingBuffer</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>class that implements a not-yet-full buffer<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="RingBuffer-__get_item__"><strong>__get_item__</strong></a>(self, i)</dt></dl>
<dl><dt><a name="RingBuffer-__init__"><strong>__init__</strong></a>(self, size_max)</dt></dl>
<dl><dt><a name="RingBuffer-append"><strong>append</strong></a>(self, x)</dt><dd><tt>append an element at the end of the buffer</tt></dd></dl>
<dl><dt><a name="RingBuffer-get"><strong>get</strong></a>(self)</dt><dd><tt>Return a <a href="__builtin__.html#list">list</a> of elements from the oldest to the newest.</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Sorter">class <strong>Sorter</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Sort by attribute or item<br>
<br>
Example usage:<br>
sort = <a href="#Sorter">Sorter</a>()<br>
<br>
<a href="__builtin__.html#list">list</a> = [(1, 2), (4, 8), (0, 3)]<br>
<a href="__builtin__.html#dict">dict</a> = [{'a': 3, 'b': 4}, {'a': 5, 'b': 2}, {'a': 0, 'b': 0},<br>
{'a': 9, 'b': 9}]<br>
<br>
<br>
<a href="#Sorter-sort">sort</a>(<a href="__builtin__.html#list">list</a>) # default sort<br>
<a href="#Sorter-sort">sort</a>(<a href="__builtin__.html#list">list</a>, 1) # sort by index 1<br>
<a href="#Sorter-sort">sort</a>(<a href="__builtin__.html#dict">dict</a>, 'a') # sort a <a href="__builtin__.html#list">list</a> of dicts by key 'a'<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Sorter-__call__"><strong>__call__</strong></a> = <a href="#Sorter-byItem">byItem</a>(self, data, itemindex<font color="#909090">=None</font>, inplace<font color="#909090">=1</font>)</dt></dl>
<dl><dt><a name="Sorter-byAttribute"><strong>byAttribute</strong></a>(self, data, attributename, inplace<font color="#909090">=1</font>)</dt></dl>
<dl><dt><a name="Sorter-byItem"><strong>byItem</strong></a>(self, data, itemindex<font color="#909090">=None</font>, inplace<font color="#909090">=1</font>)</dt></dl>
<dl><dt><a name="Sorter-sort"><strong>sort</strong></a> = <a href="#Sorter-byItem">byItem</a>(self, data, itemindex<font color="#909090">=None</font>, inplace<font color="#909090">=1</font>)</dt></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Stack">class <strong>Stack</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Implement a stack where elements can be pushed on and you can move<br>
back and forth. But no pop. Should mimic home / back / forward<br>
in a browser<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Stack-__call__"><strong>__call__</strong></a>(self)</dt><dd><tt>return the current element, or None</tt></dd></dl>
<dl><dt><a name="Stack-__init__"><strong>__init__</strong></a>(self, default<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="Stack-back"><strong>back</strong></a>(self)</dt><dd><tt>move the position back and return the current element</tt></dd></dl>
<dl><dt><a name="Stack-bubble"><strong>bubble</strong></a>(self, o)</dt><dd><tt>raise o to the top of the stack and return o. o must be in<br>
the stack</tt></dd></dl>
<dl><dt><a name="Stack-clear"><strong>clear</strong></a>(self)</dt><dd><tt>empty the stack</tt></dd></dl>
<dl><dt><a name="Stack-empty"><strong>empty</strong></a>(self)</dt></dl>
<dl><dt><a name="Stack-forward"><strong>forward</strong></a>(self)</dt><dd><tt>move the position forward and return the current element</tt></dd></dl>
<dl><dt><a name="Stack-home"><strong>home</strong></a>(self)</dt><dd><tt>push the first element onto the top of the stack</tt></dd></dl>
<dl><dt><a name="Stack-push"><strong>push</strong></a>(self, o)</dt><dd><tt>push object onto stack at current position - all elements<br>
occurring later than the current position are discarded</tt></dd></dl>
<dl><dt><a name="Stack-remove"><strong>remove</strong></a>(self, o)</dt><dd><tt>remove element o from the stack</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Xlator">class <strong>Xlator</strong></a>(<a href="__builtin__.html#dict">__builtin__.dict</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>All-in-one multiple-string-substitution class<br>
<br>
Example usage:<br>
<br>
text = "Larry Wall is the creator of Perl"<br>
adict = {<br>
"Larry Wall" : "Guido van Rossum",<br>
"creator" : "Benevolent Dictator for Life",<br>
"Perl" : "Python",<br>
}<br>
<br>
print multiple_replace(adict, text)<br>
<br>
xlat = <a href="#Xlator">Xlator</a>(adict)<br>
print xlat.<a href="#Xlator-xlat">xlat</a>(text)<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="matplotlib.cbook.html#Xlator">Xlator</a></dd>
<dd><a href="__builtin__.html#dict">__builtin__.dict</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="Xlator-__call__"><strong>__call__</strong></a>(self, match)</dt><dd><tt>Handler invoked for each regex match</tt></dd></dl>
<dl><dt><a name="Xlator-xlat"><strong>xlat</strong></a>(self, text)</dt><dd><tt>Translate text, returns the modified text.</tt></dd></dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list of weak references to the object (if defined)</tt></dd>
</dl>
<hr>
Methods inherited from <a href="__builtin__.html#dict">__builtin__.dict</a>:<br>
<dl><dt><a name="Xlator-__cmp__"><strong>__cmp__</strong></a>(...)</dt><dd><tt>x.<a href="#Xlator-__cmp__">__cmp__</a>(y) <==> cmp(x,y)</tt></dd></dl>
<dl><dt><a name="Xlator-__contains__"><strong>__contains__</strong></a>(...)</dt><dd><tt>D.<a href="#Xlator-__contains__">__contains__</a>(k) -> True if D has a key k, else False</tt></dd></dl>
<dl><dt><a name="Xlator-__delitem__"><strong>__delitem__</strong></a>(...)</dt><dd><tt>x.<a href="#Xlator-__delitem__">__delitem__</a>(y) <==> del x[y]</tt></dd></dl>
<dl><dt><a name="Xlator-__eq__"><strong>__eq__</strong></a>(...)</dt><dd><tt>x.<a href="#Xlator-__eq__">__eq__</a>(y) <==> x==y</tt></dd></dl>
<dl><dt><a name="Xlator-__ge__"><strong>__ge__</strong></a>(...)</dt><dd><tt>x.<a href="#Xlator-__ge__">__ge__</a>(y) <==> x>=y</tt></dd></dl>
<dl><dt><a name="Xlator-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#Xlator-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl>
<dl><dt><a name="Xlator-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#Xlator-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl>
<dl><dt><a name="Xlator-__gt__"><strong>__gt__</strong></a>(...)</dt><dd><tt>x.<a href="#Xlator-__gt__">__gt__</a>(y) <==> x>y</tt></dd></dl>
<dl><dt><a name="Xlator-__hash__"><strong>__hash__</strong></a>(...)</dt><dd><tt>x.<a href="#Xlator-__hash__">__hash__</a>() <==> hash(x)</tt></dd></dl>
<dl><dt><a name="Xlator-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#Xlator-__init__">__init__</a>(...) initializes x; see x.__class__.__doc__ for signature</tt></dd></dl>
<dl><dt><a name="Xlator-__iter__"><strong>__iter__</strong></a>(...)</dt><dd><tt>x.<a href="#Xlator-__iter__">__iter__</a>() <==> iter(x)</tt></dd></dl>
<dl><dt><a name="Xlator-__le__"><strong>__le__</strong></a>(...)</dt><dd><tt>x.<a href="#Xlator-__le__">__le__</a>(y) <==> x<=y</tt></dd></dl>
<dl><dt><a name="Xlator-__len__"><strong>__len__</strong></a>(...)</dt><dd><tt>x.<a href="#Xlator-__len__">__len__</a>() <==> len(x)</tt></dd></dl>
<dl><dt><a name="Xlator-__lt__"><strong>__lt__</strong></a>(...)</dt><dd><tt>x.<a href="#Xlator-__lt__">__lt__</a>(y) <==> x<y</tt></dd></dl>
<dl><dt><a name="Xlator-__ne__"><strong>__ne__</strong></a>(...)</dt><dd><tt>x.<a href="#Xlator-__ne__">__ne__</a>(y) <==> x!=y</tt></dd></dl>
<dl><dt><a name="Xlator-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#Xlator-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl>
<dl><dt><a name="Xlator-__setitem__"><strong>__setitem__</strong></a>(...)</dt><dd><tt>x.<a href="#Xlator-__setitem__">__setitem__</a>(i, y) <==> x[i]=y</tt></dd></dl>
<dl><dt><a name="Xlator-clear"><strong>clear</strong></a>(...)</dt><dd><tt>D.<a href="#Xlator-clear">clear</a>() -> None. Remove all items from D.</tt></dd></dl>
<dl><dt><a name="Xlator-copy"><strong>copy</strong></a>(...)</dt><dd><tt>D.<a href="#Xlator-copy">copy</a>() -> a shallow copy of D</tt></dd></dl>
<dl><dt><a name="Xlator-get"><strong>get</strong></a>(...)</dt><dd><tt>D.<a href="#Xlator-get">get</a>(k[,d]) -> D[k] if k in D, else d. d defaults to None.</tt></dd></dl>
<dl><dt><a name="Xlator-has_key"><strong>has_key</strong></a>(...)</dt><dd><tt>D.<a href="#Xlator-has_key">has_key</a>(k) -> True if D has a key k, else False</tt></dd></dl>
<dl><dt><a name="Xlator-items"><strong>items</strong></a>(...)</dt><dd><tt>D.<a href="#Xlator-items">items</a>() -> <a href="__builtin__.html#list">list</a> of D's (key, value) pairs, as 2-tuples</tt></dd></dl>
<dl><dt><a name="Xlator-iteritems"><strong>iteritems</strong></a>(...)</dt><dd><tt>D.<a href="#Xlator-iteritems">iteritems</a>() -> an iterator over the (key, value) items of D</tt></dd></dl>
<dl><dt><a name="Xlator-iterkeys"><strong>iterkeys</strong></a>(...)</dt><dd><tt>D.<a href="#Xlator-iterkeys">iterkeys</a>() -> an iterator over the keys of D</tt></dd></dl>
<dl><dt><a name="Xlator-itervalues"><strong>itervalues</strong></a>(...)</dt><dd><tt>D.<a href="#Xlator-itervalues">itervalues</a>() -> an iterator over the values of D</tt></dd></dl>
<dl><dt><a name="Xlator-keys"><strong>keys</strong></a>(...)</dt><dd><tt>D.<a href="#Xlator-keys">keys</a>() -> <a href="__builtin__.html#list">list</a> of D's keys</tt></dd></dl>
<dl><dt><a name="Xlator-pop"><strong>pop</strong></a>(...)</dt><dd><tt>D.<a href="#Xlator-pop">pop</a>(k[,d]) -> v, remove specified key and return the corresponding value<br>
If key is not found, d is returned if given, otherwise KeyError is raised</tt></dd></dl>
<dl><dt><a name="Xlator-popitem"><strong>popitem</strong></a>(...)</dt><dd><tt>D.<a href="#Xlator-popitem">popitem</a>() -> (k, v), remove and return some (key, value) pair as a<br>
2-tuple; but raise KeyError if D is empty</tt></dd></dl>
<dl><dt><a name="Xlator-setdefault"><strong>setdefault</strong></a>(...)</dt><dd><tt>D.<a href="#Xlator-setdefault">setdefault</a>(k[,d]) -> D.<a href="#Xlator-get">get</a>(k,d), also set D[k]=d if k not in D</tt></dd></dl>
<dl><dt><a name="Xlator-update"><strong>update</strong></a>(...)</dt><dd><tt>D.<a href="#Xlator-update">update</a>(E, **F) -> None. Update D from E and F: for k in E: D[k] = E[k]<br>
(if E has keys else: for (k, v) in E: D[k] = v) then: for k in F: D[k] = F[k]</tt></dd></dl>
<dl><dt><a name="Xlator-values"><strong>values</strong></a>(...)</dt><dd><tt>D.<a href="#Xlator-values">values</a>() -> <a href="__builtin__.html#list">list</a> of D's values</tt></dd></dl>
<hr>
Data and other attributes inherited from <a href="__builtin__.html#dict">__builtin__.dict</a>:<br>
<dl><dt><strong>__new__</strong> = <built-in method __new__ of type object at 0x8145420><dd><tt>T.<a href="#Xlator-__new__">__new__</a>(S, ...) -> a new object with type S, a subtype of T</tt></dl>
<dl><dt><strong>fromkeys</strong> = <built-in method fromkeys of type object at 0x8377744><dd><tt><a href="__builtin__.html#dict">dict</a>.<a href="#Xlator-fromkeys">fromkeys</a>(S[,v]) -> New <a href="__builtin__.html#dict">dict</a> with keys from S and values equal to v.<br>
v defaults to None.</tt></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="maxdict">class <strong>maxdict</strong></a>(<a href="__builtin__.html#dict">__builtin__.dict</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>A dictionary with a maximum size; this doesn't override all the<br>
relevant methods to contrain size, just setitem, so use with<br>
caution<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="matplotlib.cbook.html#maxdict">maxdict</a></dd>
<dd><a href="__builtin__.html#dict">__builtin__.dict</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="maxdict-__init__"><strong>__init__</strong></a>(self, maxsize)</dt></dl>
<dl><dt><a name="maxdict-__setitem__"><strong>__setitem__</strong></a>(self, k, v)</dt></dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list of weak references to the object (if defined)</tt></dd>
</dl>
<hr>
Methods inherited from <a href="__builtin__.html#dict">__builtin__.dict</a>:<br>
<dl><dt><a name="maxdict-__cmp__"><strong>__cmp__</strong></a>(...)</dt><dd><tt>x.<a href="#maxdict-__cmp__">__cmp__</a>(y) <==> cmp(x,y)</tt></dd></dl>
<dl><dt><a name="maxdict-__contains__"><strong>__contains__</strong></a>(...)</dt><dd><tt>D.<a href="#maxdict-__contains__">__contains__</a>(k) -> True if D has a key k, else False</tt></dd></dl>
<dl><dt><a name="maxdict-__delitem__"><strong>__delitem__</strong></a>(...)</dt><dd><tt>x.<a href="#maxdict-__delitem__">__delitem__</a>(y) <==> del x[y]</tt></dd></dl>
<dl><dt><a name="maxdict-__eq__"><strong>__eq__</strong></a>(...)</dt><dd><tt>x.<a href="#maxdict-__eq__">__eq__</a>(y) <==> x==y</tt></dd></dl>
<dl><dt><a name="maxdict-__ge__"><strong>__ge__</strong></a>(...)</dt><dd><tt>x.<a href="#maxdict-__ge__">__ge__</a>(y) <==> x>=y</tt></dd></dl>
<dl><dt><a name="maxdict-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#maxdict-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl>
<dl><dt><a name="maxdict-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#maxdict-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl>
<dl><dt><a name="maxdict-__gt__"><strong>__gt__</strong></a>(...)</dt><dd><tt>x.<a href="#maxdict-__gt__">__gt__</a>(y) <==> x>y</tt></dd></dl>
<dl><dt><a name="maxdict-__hash__"><strong>__hash__</strong></a>(...)</dt><dd><tt>x.<a href="#maxdict-__hash__">__hash__</a>() <==> hash(x)</tt></dd></dl>
<dl><dt><a name="maxdict-__iter__"><strong>__iter__</strong></a>(...)</dt><dd><tt>x.<a href="#maxdict-__iter__">__iter__</a>() <==> iter(x)</tt></dd></dl>
<dl><dt><a name="maxdict-__le__"><strong>__le__</strong></a>(...)</dt><dd><tt>x.<a href="#maxdict-__le__">__le__</a>(y) <==> x<=y</tt></dd></dl>
<dl><dt><a name="maxdict-__len__"><strong>__len__</strong></a>(...)</dt><dd><tt>x.<a href="#maxdict-__len__">__len__</a>() <==> len(x)</tt></dd></dl>
<dl><dt><a name="maxdict-__lt__"><strong>__lt__</strong></a>(...)</dt><dd><tt>x.<a href="#maxdict-__lt__">__lt__</a>(y) <==> x<y</tt></dd></dl>
<dl><dt><a name="maxdict-__ne__"><strong>__ne__</strong></a>(...)</dt><dd><tt>x.<a href="#maxdict-__ne__">__ne__</a>(y) <==> x!=y</tt></dd></dl>
<dl><dt><a name="maxdict-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#maxdict-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl>
<dl><dt><a name="maxdict-clear"><strong>clear</strong></a>(...)</dt><dd><tt>D.<a href="#maxdict-clear">clear</a>() -> None. Remove all items from D.</tt></dd></dl>
<dl><dt><a name="maxdict-copy"><strong>copy</strong></a>(...)</dt><dd><tt>D.<a href="#maxdict-copy">copy</a>() -> a shallow copy of D</tt></dd></dl>
<dl><dt><a name="maxdict-get"><strong>get</strong></a>(...)</dt><dd><tt>D.<a href="#maxdict-get">get</a>(k[,d]) -> D[k] if k in D, else d. d defaults to None.</tt></dd></dl>
<dl><dt><a name="maxdict-has_key"><strong>has_key</strong></a>(...)</dt><dd><tt>D.<a href="#maxdict-has_key">has_key</a>(k) -> True if D has a key k, else False</tt></dd></dl>
<dl><dt><a name="maxdict-items"><strong>items</strong></a>(...)</dt><dd><tt>D.<a href="#maxdict-items">items</a>() -> <a href="__builtin__.html#list">list</a> of D's (key, value) pairs, as 2-tuples</tt></dd></dl>
<dl><dt><a name="maxdict-iteritems"><strong>iteritems</strong></a>(...)</dt><dd><tt>D.<a href="#maxdict-iteritems">iteritems</a>() -> an iterator over the (key, value) items of D</tt></dd></dl>
<dl><dt><a name="maxdict-iterkeys"><strong>iterkeys</strong></a>(...)</dt><dd><tt>D.<a href="#maxdict-iterkeys">iterkeys</a>() -> an iterator over the keys of D</tt></dd></dl>
<dl><dt><a name="maxdict-itervalues"><strong>itervalues</strong></a>(...)</dt><dd><tt>D.<a href="#maxdict-itervalues">itervalues</a>() -> an iterator over the values of D</tt></dd></dl>
<dl><dt><a name="maxdict-keys"><strong>keys</strong></a>(...)</dt><dd><tt>D.<a href="#maxdict-keys">keys</a>() -> <a href="__builtin__.html#list">list</a> of D's keys</tt></dd></dl>
<dl><dt><a name="maxdict-pop"><strong>pop</strong></a>(...)</dt><dd><tt>D.<a href="#maxdict-pop">pop</a>(k[,d]) -> v, remove specified key and return the corresponding value<br>
If key is not found, d is returned if given, otherwise KeyError is raised</tt></dd></dl>
<dl><dt><a name="maxdict-popitem"><strong>popitem</strong></a>(...)</dt><dd><tt>D.<a href="#maxdict-popitem">popitem</a>() -> (k, v), remove and return some (key, value) pair as a<br>
2-tuple; but raise KeyError if D is empty</tt></dd></dl>
<dl><dt><a name="maxdict-setdefault"><strong>setdefault</strong></a>(...)</dt><dd><tt>D.<a href="#maxdict-setdefault">setdefault</a>(k[,d]) -> D.<a href="#maxdict-get">get</a>(k,d), also set D[k]=d if k not in D</tt></dd></dl>
<dl><dt><a name="maxdict-update"><strong>update</strong></a>(...)</dt><dd><tt>D.<a href="#maxdict-update">update</a>(E, **F) -> None. Update D from E and F: for k in E: D[k] = E[k]<br>
(if E has keys else: for (k, v) in E: D[k] = v) then: for k in F: D[k] = F[k]</tt></dd></dl>
<dl><dt><a name="maxdict-values"><strong>values</strong></a>(...)</dt><dd><tt>D.<a href="#maxdict-values">values</a>() -> <a href="__builtin__.html#list">list</a> of D's values</tt></dd></dl>
<hr>
Data and other attributes inherited from <a href="__builtin__.html#dict">__builtin__.dict</a>:<br>
<dl><dt><strong>__new__</strong> = <built-in method __new__ of type object at 0x8145420><dd><tt>T.<a href="#maxdict-__new__">__new__</a>(S, ...) -> a new object with type S, a subtype of T</tt></dl>
<dl><dt><strong>fromkeys</strong> = <built-in method fromkeys of type object at 0x837689c><dd><tt><a href="__builtin__.html#dict">dict</a>.<a href="#maxdict-fromkeys">fromkeys</a>(S[,v]) -> New <a href="__builtin__.html#dict">dict</a> with keys from S and values equal to v.<br>
v defaults to None.</tt></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="silent_list">class <strong>silent_list</strong></a>(<a href="__builtin__.html#list">__builtin__.list</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>override repr when returning a <a href="__builtin__.html#list">list</a> of matplotlib artists to<br>
prevent long, meaningless output. This is meant to be used for a<br>
homogeneous <a href="__builtin__.html#list">list</a> of a give type<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="matplotlib.cbook.html#silent_list">silent_list</a></dd>
<dd><a href="__builtin__.html#list">__builtin__.list</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="silent_list-__init__"><strong>__init__</strong></a>(self, type, seq<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="silent_list-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
<dl><dt><a name="silent_list-__str__"><strong>__str__</strong></a>(self)</dt></dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list of weak references to the object (if defined)</tt></dd>
</dl>
<hr>
Methods inherited from <a href="__builtin__.html#list">__builtin__.list</a>:<br>
<dl><dt><a name="silent_list-__add__"><strong>__add__</strong></a>(...)</dt><dd><tt>x.<a href="#silent_list-__add__">__add__</a>(y) <==> x+y</tt></dd></dl>
<dl><dt><a name="silent_list-__contains__"><strong>__contains__</strong></a>(...)</dt><dd><tt>x.<a href="#silent_list-__contains__">__contains__</a>(y) <==> y in x</tt></dd></dl>
<dl><dt><a name="silent_list-__delitem__"><strong>__delitem__</strong></a>(...)</dt><dd><tt>x.<a href="#silent_list-__delitem__">__delitem__</a>(y) <==> del x[y]</tt></dd></dl>
<dl><dt><a name="silent_list-__delslice__"><strong>__delslice__</strong></a>(...)</dt><dd><tt>x.<a href="#silent_list-__delslice__">__delslice__</a>(i, j) <==> del x[i:j]<br>
<br>
Use of negative indices is not supported.</tt></dd></dl>
<dl><dt><a name="silent_list-__eq__"><strong>__eq__</strong></a>(...)</dt><dd><tt>x.<a href="#silent_list-__eq__">__eq__</a>(y) <==> x==y</tt></dd></dl>
<dl><dt><a name="silent_list-__ge__"><strong>__ge__</strong></a>(...)</dt><dd><tt>x.<a href="#silent_list-__ge__">__ge__</a>(y) <==> x>=y</tt></dd></dl>
<dl><dt><a name="silent_list-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#silent_list-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl>
<dl><dt><a name="silent_list-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#silent_list-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl>
<dl><dt><a name="silent_list-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#silent_list-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br>
<br>
Use of negative indices is not supported.</tt></dd></dl>
<dl><dt><a name="silent_list-__gt__"><strong>__gt__</strong></a>(...)</dt><dd><tt>x.<a href="#silent_list-__gt__">__gt__</a>(y) <==> x>y</tt></dd></dl>
<dl><dt><a name="silent_list-__hash__"><strong>__hash__</strong></a>(...)</dt><dd><tt>x.<a href="#silent_list-__hash__">__hash__</a>() <==> hash(x)</tt></dd></dl>
<dl><dt><a name="silent_list-__iadd__"><strong>__iadd__</strong></a>(...)</dt><dd><tt>x.<a href="#silent_list-__iadd__">__iadd__</a>(y) <==> x+=y</tt></dd></dl>
<dl><dt><a name="silent_list-__imul__"><strong>__imul__</strong></a>(...)</dt><dd><tt>x.<a href="#silent_list-__imul__">__imul__</a>(y) <==> x*=y</tt></dd></dl>
<dl><dt><a name="silent_list-__iter__"><strong>__iter__</strong></a>(...)</dt><dd><tt>x.<a href="#silent_list-__iter__">__iter__</a>() <==> iter(x)</tt></dd></dl>
<dl><dt><a name="silent_list-__le__"><strong>__le__</strong></a>(...)</dt><dd><tt>x.<a href="#silent_list-__le__">__le__</a>(y) <==> x<=y</tt></dd></dl>
<dl><dt><a name="silent_list-__len__"><strong>__len__</strong></a>(...)</dt><dd><tt>x.<a href="#silent_list-__len__">__len__</a>() <==> len(x)</tt></dd></dl>
<dl><dt><a name="silent_list-__lt__"><strong>__lt__</strong></a>(...)</dt><dd><tt>x.<a href="#silent_list-__lt__">__lt__</a>(y) <==> x<y</tt></dd></dl>
<dl><dt><a name="silent_list-__mul__"><strong>__mul__</strong></a>(...)</dt><dd><tt>x.<a href="#silent_list-__mul__">__mul__</a>(n) <==> x*n</tt></dd></dl>
<dl><dt><a name="silent_list-__ne__"><strong>__ne__</strong></a>(...)</dt><dd><tt>x.<a href="#silent_list-__ne__">__ne__</a>(y) <==> x!=y</tt></dd></dl>
<dl><dt><a name="silent_list-__reversed__"><strong>__reversed__</strong></a>(...)</dt><dd><tt>L.<a href="#silent_list-__reversed__">__reversed__</a>() -- return a reverse iterator over the <a href="__builtin__.html#list">list</a></tt></dd></dl>
<dl><dt><a name="silent_list-__rmul__"><strong>__rmul__</strong></a>(...)</dt><dd><tt>x.<a href="#silent_list-__rmul__">__rmul__</a>(n) <==> n*x</tt></dd></dl>
<dl><dt><a name="silent_list-__setitem__"><strong>__setitem__</strong></a>(...)</dt><dd><tt>x.<a href="#silent_list-__setitem__">__setitem__</a>(i, y) <==> x[i]=y</tt></dd></dl>
<dl><dt><a name="silent_list-__setslice__"><strong>__setslice__</strong></a>(...)</dt><dd><tt>x.<a href="#silent_list-__setslice__">__setslice__</a>(i, j, y) <==> x[i:j]=y<br>
<br>
Use of negative indices is not supported.</tt></dd></dl>
<dl><dt><a name="silent_list-append"><strong>append</strong></a>(...)</dt><dd><tt>L.<a href="#silent_list-append">append</a>(object) -- append object to end</tt></dd></dl>
<dl><dt><a name="silent_list-count"><strong>count</strong></a>(...)</dt><dd><tt>L.<a href="#silent_list-count">count</a>(value) -> integer -- return number of occurrences of value</tt></dd></dl>
<dl><dt><a name="silent_list-extend"><strong>extend</strong></a>(...)</dt><dd><tt>L.<a href="#silent_list-extend">extend</a>(iterable) -- extend <a href="__builtin__.html#list">list</a> by appending elements from the iterable</tt></dd></dl>
<dl><dt><a name="silent_list-index"><strong>index</strong></a>(...)</dt><dd><tt>L.<a href="#silent_list-index">index</a>(value, [start, [stop]]) -> integer -- return first index of value</tt></dd></dl>
<dl><dt><a name="silent_list-insert"><strong>insert</strong></a>(...)</dt><dd><tt>L.<a href="#silent_list-insert">insert</a>(index, object) -- insert object before index</tt></dd></dl>
<dl><dt><a name="silent_list-pop"><strong>pop</strong></a>(...)</dt><dd><tt>L.<a href="#silent_list-pop">pop</a>([index]) -> item -- remove and return item at index (default last)</tt></dd></dl>
<dl><dt><a name="silent_list-remove"><strong>remove</strong></a>(...)</dt><dd><tt>L.<a href="#silent_list-remove">remove</a>(value) -- remove first occurrence of value</tt></dd></dl>
<dl><dt><a name="silent_list-reverse"><strong>reverse</strong></a>(...)</dt><dd><tt>L.<a href="#silent_list-reverse">reverse</a>() -- reverse *IN PLACE*</tt></dd></dl>
<dl><dt><a name="silent_list-sort"><strong>sort</strong></a>(...)</dt><dd><tt>L.<a href="#silent_list-sort">sort</a>(cmp=None, key=None, reverse=False) -- stable sort *IN PLACE*;<br>
cmp(x, y) -> -1, 0, 1</tt></dd></dl>
<hr>
Data and other attributes inherited from <a href="__builtin__.html#list">__builtin__.list</a>:<br>
<dl><dt><strong>__new__</strong> = <built-in method __new__ of type object at 0x8144360><dd><tt>T.<a href="#silent_list-__new__">__new__</a>(S, ...) -> a new object with type S, a subtype of T</tt></dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
<td width="100%"><dl><dt><a name="-allequal"><strong>allequal</strong></a>(seq)</dt><dd><tt>return true if all elements of seq compare equal. If seq is 0 or<br>
1 length, return True</tt></dd></dl>
<dl><dt><a name="-allpairs"><strong>allpairs</strong></a>(x)</dt><dd><tt>return all possible pairs in sequence x<br>
<br>
Condensed by Alex Martelli from this thread on c.l.python<br>
<a href="http://groups.google.com/groups?q=all+pairs+group:*python*&hl=en&lr=&ie=UTF-8&selm=mailman.4028.1096403649.5135.python-list%40python.org&rnum=1">http://groups.google.com/groups?q=all+pairs+group:*python*&hl=en&lr=&ie=UTF-8&selm=mailman.4028.1096403649.5135.python-list%40python.org&rnum=1</a></tt></dd></dl>
<dl><dt><a name="-alltrue"><strong>alltrue</strong></a>(seq)</dt></dl>
<dl><dt><a name="-dedent"><strong>dedent</strong></a>(s)</dt><dd><tt>Remove excess indentation from docstrings.<br>
<br>
Discards any leading blank lines, then removes up to<br>
n whitespace characters from each line, where n is<br>
the number of leading whitespace characters in the<br>
first line. It differs from textwrap.dedent in its<br>
deletion of leading blank lines and its use of the<br>
first non-blank line to determine the indentation.</tt></dd></dl>
<dl><dt><a name="-dict_delall"><strong>dict_delall</strong></a>(d, keys)</dt><dd><tt>delete all of the keys from the <a href="__builtin__.html#dict">dict</a> d</tt></dd></dl>
<dl><dt><a name="-exception_to_str"><strong>exception_to_str</strong></a>(s<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="-finddir"><strong>finddir</strong></a>(o, match, case<font color="#909090">=False</font>)</dt><dd><tt>return all attributes of o which match string in match. if case<br>
is True require an exact case match.</tt></dd></dl>
<dl><dt><a name="-flatten"><strong>flatten</strong></a>(seq, scalarp<font color="#909090">=<function is_scalar at 0x8353a3c></font>)</dt><dd><tt>this generator flattens nested containers such as<br>
<br>
>>> l=( ('John', 'Hunter'), (1,23), [[[[42,(5,23)]]]])<br>
<br>
so that<br>
<br>
>>> for i in <a href="#-flatten">flatten</a>(l): print i,<br>
John Hunter 1 23 42 5 23<br>
<br>
By: Composite of Holger Krekel and Luther Blissett<br>
From: <a href="http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/121294">http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/121294</a><br>
and Recipe 1.12 in cookbook</tt></dd></dl>
<dl><dt><a name="-get_recursive_filelist"><strong>get_recursive_filelist</strong></a>(args)</dt><dd><tt>Recurs all the files and dirs in args ignoring symbolic links and<br>
return the files as a <a href="__builtin__.html#list">list</a> of strings</tt></dd></dl>
<dl><dt><a name="-get_split_ind"><strong>get_split_ind</strong></a>(seq, N)</dt><dd><tt>seq is a <a href="__builtin__.html#list">list</a> of words. Return the index into seq such that<br>
len(' '.join(seq[:ind])<=N</tt></dd></dl>
<dl><dt><a name="-is_file_like"><strong>is_file_like</strong></a>(obj)</dt></dl>
<dl><dt><a name="-is_numlike"><strong>is_numlike</strong></a>(obj)</dt></dl>
<dl><dt><a name="-is_scalar"><strong>is_scalar</strong></a>(obj)</dt></dl>
<dl><dt><a name="-is_string_like"><strong>is_string_like</strong></a>(obj)</dt></dl>
<dl><dt><a name="-iterable"><strong>iterable</strong></a>(obj)</dt></dl>
<dl><dt><a name="-listFiles"><strong>listFiles</strong></a>(root, patterns<font color="#909090">='*'</font>, recurse<font color="#909090">=1</font>, return_folders<font color="#909090">=0</font>)</dt><dd><tt>Recursively <a href="__builtin__.html#list">list</a> files<br>
from Parmar and Martelli in the Python Cookbook</tt></dd></dl>
<dl><dt><a name="-mkdirs"><strong>mkdirs</strong></a>(newdir, mode<font color="#909090">=511</font>)</dt></dl>
<dl><dt><a name="-onetrue"><strong>onetrue</strong></a>(seq)</dt></dl>
<dl><dt><a name="-pieces"><strong>pieces</strong></a>(seq, num<font color="#909090">=2</font>)</dt><dd><tt>Break up the seq into num tuples</tt></dd></dl>
<dl><dt><a name="-popall"><strong>popall</strong></a>(seq)</dt><dd><tt>empty a <a href="__builtin__.html#list">list</a></tt></dd></dl>
<dl><dt><a name="-popd"><strong>popd</strong></a>(d, *args)</dt><dd><tt>Should behave like python2.3 pop method; d is a <a href="__builtin__.html#dict">dict</a><br>
<br>
# returns value for key and deletes item; raises a KeyError if key<br>
# is not in <a href="__builtin__.html#dict">dict</a><br>
val = <a href="#-popd">popd</a>(d, key)<br>
<br>
# returns value for key if key exists, else default. Delete key,<br>
# val item if it exists. Will not raise a KeyError<br>
val = <a href="#-popd">popd</a>(d, key, default)</tt></dd></dl>
<dl><dt><a name="-report_memory"><strong>report_memory</strong></a>(i<font color="#909090">=0</font>)</dt><dd><tt>return the memory consumed by process</tt></dd></dl>
<dl><dt><a name="-reverse_dict"><strong>reverse_dict</strong></a>(d)</dt><dd><tt>reverse the dictionary -- may lose data if values are not uniq!</tt></dd></dl>
<dl><dt><a name="-soundex"><strong>soundex</strong></a>(name, len<font color="#909090">=4</font>)</dt><dd><tt>soundex module conforming to Odell-Russell algorithm</tt></dd></dl>
<dl><dt><a name="-strip_math"><strong>strip_math</strong></a>(s)</dt><dd><tt>remove latex formatting from mathtext</tt></dd></dl>
<dl><dt><a name="-unique"><strong>unique</strong></a>(x)</dt><dd><tt>Return a <a href="__builtin__.html#list">list</a> of unique elements of x</tt></dd></dl>
<dl><dt><a name="-wrap"><strong>wrap</strong></a>(prefix, text, cols)</dt><dd><tt>wrap text with prefix at length cols</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
<td width="100%"><strong>generators</strong> = _Feature((2, 2, 0, 'alpha', 1), (2, 3, 0, 'final', 0), 0)<br>
<strong>major</strong> = 2<br>
<strong>minor1</strong> = 5<br>
<strong>minor2</strong> = 1<br>
<strong>s</strong> = 'final'<br>
<strong>tmp</strong> = 0</td></tr></table>
@footer@