fonttools/Documentation/robofabDocs/robofab.features.substitute.html
Erik van Blokland 3646055ea2 initial import
git-svn-id: http://svn.robofab.com/trunk@1 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2008-01-07 17:40:34 +00:00

626 lines
48 KiB
HTML

<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module robofab.features.substitute</title>
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="robofab.html"><font color="#ffffff">robofab</font></a>.<a href="robofab.features.html"><font color="#ffffff">features</font></a>.substitute</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/code/projects/robofab/Lib/robofab/features/substitute.py">/code/projects/robofab/Lib/robofab/features/substitute.py</a></font></td></tr></table>
<p><tt>Set&nbsp;of&nbsp;objects&nbsp;that&nbsp;process&nbsp;lists&nbsp;of&nbsp;glyphs&nbsp;and&nbsp;performs&nbsp;substitutions.<br>
&nbsp;<br>
&nbsp;<br>
Things&nbsp;that&nbsp;need&nbsp;to&nbsp;be&nbsp;supported:<br>
-&nbsp;group&nbsp;lookups&nbsp;in&nbsp;<a href="#SequenceToSingle">SequenceToSingle</a><br>
-&nbsp;SingleToSequence&nbsp;class&nbsp;(ligature&nbsp;decomposition)<br>
-&nbsp;allow&nbsp;contextual&nbsp;lookup&nbsp;to&nbsp;match&nbsp;and&nbsp;replace&nbsp;more&nbsp;than&nbsp;one&nbsp;glyph<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;((['a',&nbsp;'b'],&nbsp;['c',&nbsp;'d'],&nbsp;['e',&nbsp;'f']),&nbsp;['c.alt',&nbsp;'d.alt'])<br>
-&nbsp;support&nbsp;group&nbsp;names&nbsp;in&nbsp;place&nbsp;of&nbsp;lists.&nbsp;this&nbsp;should&nbsp;be&nbsp;optional.<br>
&nbsp;&nbsp;&nbsp;this&nbsp;will&nbsp;require&nbsp;that&nbsp;all&nbsp;groups&nbsp;should&nbsp;be&nbsp;prefixed&nbsp;by&nbsp;'@'</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="robofab.features.featureTools.html#SortedDict">robofab.features.featureTools.SortedDict</a>(<a href="__builtin__.html#object">__builtin__.object</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="robofab.features.substitute.html#Substitute">Substitute</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="robofab.features.substitute.html#_BaseListFeature">_BaseListFeature</a>(<a href="__builtin__.html#list">__builtin__.list</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="robofab.features.substitute.html#ContextualSingleToSingle">ContextualSingleToSingle</a>
</font></dt><dt><font face="helvetica, arial"><a href="robofab.features.substitute.html#SequenceToSingle">SequenceToSingle</a>
</font></dt><dt><font face="helvetica, arial"><a href="robofab.features.substitute.html#SingleToSingle">SingleToSingle</a>
</font></dt></dl>
</dd>
<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="robofab.features.substitute.html#Random">Random</a>
</font></dt></dl>
</dd>
</dl>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="ContextualSingleToSingle">class <strong>ContextualSingleToSingle</strong></a>(<a href="robofab.features.substitute.html#_BaseListFeature">_BaseListFeature</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Replace&nbsp;a&nbsp;of&nbsp;glyph&nbsp;with&nbsp;another&nbsp;glyph&nbsp;if<br>
it&nbsp;is&nbsp;contained&nbsp;in&nbsp;a&nbsp;specified&nbsp;sequence.<br>
&nbsp;<br>
Behavior:&nbsp;list<br>
&nbsp;<br>
Substitution&nbsp;Structure:<br>
[<br>
((leading&nbsp;glyphs,&nbsp;before,&nbsp;trailing&nbsp;glyphs),&nbsp;after)<br>
]<br>
-&nbsp;typical&nbsp;structure<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(('A',&nbsp;'a',&nbsp;'Z'),&nbsp;'a.alt')<br>
-the&nbsp;leading&nbsp;glyphs&nbsp;can&nbsp;be&nbsp;a&nbsp;list&nbsp;and/or&nbsp;the&nbsp;trailing&nbsp;glyphs&nbsp;can&nbsp;be&nbsp;a&nbsp;list<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;((['A',&nbsp;'B'],&nbsp;'a',&nbsp;'Z'),&nbsp;'a.alt')<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(('A',&nbsp;'a',&nbsp;['Y',&nbsp;'Z']),&nbsp;'a.alt')<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;((['A',&nbsp;'B'],&nbsp;'a',&nbsp;['Y',&nbsp;'Z']),&nbsp;'a.alt')<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;these&nbsp;lists&nbsp;contain&nbsp;another&nbsp;list&nbsp;representing&nbsp;a&nbsp;group&nbsp;of&nbsp;glyphs&nbsp;that&nbsp;can&nbsp;be&nbsp;matched<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(([['A',&nbsp;'A.alt'],&nbsp;['B',&nbsp;'B.alt']],&nbsp;'a',&nbsp;[['Y',&nbsp;'Y.alt'],&nbsp;['Z',&nbsp;'Z.alt']]),&nbsp;'a.alt')<br>
-&nbsp;before&nbsp;can&nbsp;be&nbsp;a&nbsp;list<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(('A',&nbsp;['a',&nbsp;'a.alt1'],&nbsp;'Z'),&nbsp;'a.alt2')<br>
-&nbsp;after&nbsp;can&nbsp;be&nbsp;a&nbsp;list&nbsp;as&nbsp;long&nbsp;as&nbsp;before&nbsp;is&nbsp;a&nbsp;list&nbsp;of&nbsp;the&nbsp;same&nbsp;length<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(('A',&nbsp;['a',&nbsp;'b'],&nbsp;'Z'),&nbsp;['a.alt',&nbsp;'b.alt'])<br>
-&nbsp;the&nbsp;front&nbsp;or&nbsp;back&nbsp;can&nbsp;be&nbsp;set&nbsp;to&nbsp;None&nbsp;indicating&nbsp;that&nbsp;anything&nbsp;can&nbsp;be&nbsp;in&nbsp;that&nbsp;position<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;((None,&nbsp;'a',&nbsp;['a',&nbsp;'b']),&nbsp;'a.swash')<br>
&nbsp;<br>
Allows&nbsp;Sub-Lookups:&nbsp;No<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="robofab.features.substitute.html#ContextualSingleToSingle">ContextualSingleToSingle</a></dd>
<dd><a href="robofab.features.substitute.html#_BaseListFeature">_BaseListFeature</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="ContextualSingleToSingle-processString"><strong>processString</strong></a>(self, glyphString)</dt></dl>
<dl><dt><a name="ContextualSingleToSingle-processStringX"><strong>processStringX</strong></a>(self, glyphString)</dt></dl>
<hr>
Methods inherited from <a href="robofab.features.substitute.html#_BaseListFeature">_BaseListFeature</a>:<br>
<dl><dt><a name="ContextualSingleToSingle-__init__"><strong>__init__</strong></a>(self, substitution)</dt></dl>
<hr>
Data and other attributes inherited from <a href="robofab.features.substitute.html#_BaseListFeature">_BaseListFeature</a>:<br>
<dl><dt><strong>__dict__</strong> = &lt;dictproxy object at 0x10bb3b0&gt;<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dl>
<dl><dt><strong>__weakref__</strong> = &lt;attribute '__weakref__' of '_BaseListFeature' objects&gt;<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dl>
<hr>
Methods inherited from <a href="__builtin__.html#list">__builtin__.list</a>:<br>
<dl><dt><a name="ContextualSingleToSingle-__add__"><strong>__add__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__add__">__add__</a>(y)&nbsp;&lt;==&gt;&nbsp;x+y</tt></dd></dl>
<dl><dt><a name="ContextualSingleToSingle-__contains__"><strong>__contains__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__contains__">__contains__</a>(y)&nbsp;&lt;==&gt;&nbsp;y&nbsp;in&nbsp;x</tt></dd></dl>
<dl><dt><a name="ContextualSingleToSingle-__delitem__"><strong>__delitem__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__delitem__">__delitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;del&nbsp;x[y]</tt></dd></dl>
<dl><dt><a name="ContextualSingleToSingle-__delslice__"><strong>__delslice__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__delslice__">__delslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;del&nbsp;x[i:j]<br>
&nbsp;<br>
Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>
<dl><dt><a name="ContextualSingleToSingle-__eq__"><strong>__eq__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__eq__">__eq__</a>(y)&nbsp;&lt;==&gt;&nbsp;x==y</tt></dd></dl>
<dl><dt><a name="ContextualSingleToSingle-__ge__"><strong>__ge__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__ge__">__ge__</a>(y)&nbsp;&lt;==&gt;&nbsp;x&gt;=y</tt></dd></dl>
<dl><dt><a name="ContextualSingleToSingle-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>
<dl><dt><a name="ContextualSingleToSingle-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>
<dl><dt><a name="ContextualSingleToSingle-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
&nbsp;<br>
Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>
<dl><dt><a name="ContextualSingleToSingle-__gt__"><strong>__gt__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__gt__">__gt__</a>(y)&nbsp;&lt;==&gt;&nbsp;x&gt;y</tt></dd></dl>
<dl><dt><a name="ContextualSingleToSingle-__hash__"><strong>__hash__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__hash__">__hash__</a>()&nbsp;&lt;==&gt;&nbsp;hash(x)</tt></dd></dl>
<dl><dt><a name="ContextualSingleToSingle-__iadd__"><strong>__iadd__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__iadd__">__iadd__</a>(y)&nbsp;&lt;==&gt;&nbsp;x+=y</tt></dd></dl>
<dl><dt><a name="ContextualSingleToSingle-__imul__"><strong>__imul__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__imul__">__imul__</a>(y)&nbsp;&lt;==&gt;&nbsp;x*=y</tt></dd></dl>
<dl><dt><a name="ContextualSingleToSingle-__iter__"><strong>__iter__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__iter__">__iter__</a>()&nbsp;&lt;==&gt;&nbsp;iter(x)</tt></dd></dl>
<dl><dt><a name="ContextualSingleToSingle-__le__"><strong>__le__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__le__">__le__</a>(y)&nbsp;&lt;==&gt;&nbsp;x&lt;=y</tt></dd></dl>
<dl><dt><a name="ContextualSingleToSingle-__len__"><strong>__len__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__len__">__len__</a>()&nbsp;&lt;==&gt;&nbsp;len(x)</tt></dd></dl>
<dl><dt><a name="ContextualSingleToSingle-__lt__"><strong>__lt__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__lt__">__lt__</a>(y)&nbsp;&lt;==&gt;&nbsp;x&lt;y</tt></dd></dl>
<dl><dt><a name="ContextualSingleToSingle-__mul__"><strong>__mul__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__mul__">__mul__</a>(n)&nbsp;&lt;==&gt;&nbsp;x*n</tt></dd></dl>
<dl><dt><a name="ContextualSingleToSingle-__ne__"><strong>__ne__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__ne__">__ne__</a>(y)&nbsp;&lt;==&gt;&nbsp;x!=y</tt></dd></dl>
<dl><dt><a name="ContextualSingleToSingle-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>
<dl><dt><a name="ContextualSingleToSingle-__rmul__"><strong>__rmul__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__rmul__">__rmul__</a>(n)&nbsp;&lt;==&gt;&nbsp;n*x</tt></dd></dl>
<dl><dt><a name="ContextualSingleToSingle-__setitem__"><strong>__setitem__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__setitem__">__setitem__</a>(i,&nbsp;y)&nbsp;&lt;==&gt;&nbsp;x[i]=y</tt></dd></dl>
<dl><dt><a name="ContextualSingleToSingle-__setslice__"><strong>__setslice__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__setslice__">__setslice__</a>(i,&nbsp;j,&nbsp;y)&nbsp;&lt;==&gt;&nbsp;x[i:j]=y<br>
&nbsp;<br>
Use&nbsp;&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>
<dl><dt><a name="ContextualSingleToSingle-append"><strong>append</strong></a>(...)</dt><dd><tt>L.<a href="#ContextualSingleToSingle-append">append</a>(object)&nbsp;--&nbsp;append&nbsp;object&nbsp;to&nbsp;end</tt></dd></dl>
<dl><dt><a name="ContextualSingleToSingle-count"><strong>count</strong></a>(...)</dt><dd><tt>L.<a href="#ContextualSingleToSingle-count">count</a>(value)&nbsp;-&gt;&nbsp;integer&nbsp;--&nbsp;return&nbsp;number&nbsp;of&nbsp;occurrences&nbsp;of&nbsp;value</tt></dd></dl>
<dl><dt><a name="ContextualSingleToSingle-extend"><strong>extend</strong></a>(...)</dt><dd><tt>L.<a href="#ContextualSingleToSingle-extend">extend</a>(iterable)&nbsp;--&nbsp;extend&nbsp;list&nbsp;by&nbsp;appending&nbsp;elements&nbsp;from&nbsp;the&nbsp;iterable</tt></dd></dl>
<dl><dt><a name="ContextualSingleToSingle-index"><strong>index</strong></a>(...)</dt><dd><tt>L.<a href="#ContextualSingleToSingle-index">index</a>(value,&nbsp;[start,&nbsp;[stop]])&nbsp;-&gt;&nbsp;integer&nbsp;--&nbsp;return&nbsp;first&nbsp;index&nbsp;of&nbsp;value</tt></dd></dl>
<dl><dt><a name="ContextualSingleToSingle-insert"><strong>insert</strong></a>(...)</dt><dd><tt>L.<a href="#ContextualSingleToSingle-insert">insert</a>(index,&nbsp;object)&nbsp;--&nbsp;insert&nbsp;object&nbsp;before&nbsp;index</tt></dd></dl>
<dl><dt><a name="ContextualSingleToSingle-pop"><strong>pop</strong></a>(...)</dt><dd><tt>L.<a href="#ContextualSingleToSingle-pop">pop</a>([index])&nbsp;-&gt;&nbsp;item&nbsp;--&nbsp;remove&nbsp;and&nbsp;return&nbsp;item&nbsp;at&nbsp;index&nbsp;(default&nbsp;last)</tt></dd></dl>
<dl><dt><a name="ContextualSingleToSingle-remove"><strong>remove</strong></a>(...)</dt><dd><tt>L.<a href="#ContextualSingleToSingle-remove">remove</a>(value)&nbsp;--&nbsp;remove&nbsp;first&nbsp;occurrence&nbsp;of&nbsp;value</tt></dd></dl>
<dl><dt><a name="ContextualSingleToSingle-reverse"><strong>reverse</strong></a>(...)</dt><dd><tt>L.<a href="#ContextualSingleToSingle-reverse">reverse</a>()&nbsp;--&nbsp;reverse&nbsp;*IN&nbsp;PLACE*</tt></dd></dl>
<dl><dt><a name="ContextualSingleToSingle-sort"><strong>sort</strong></a>(...)</dt><dd><tt>L.<a href="#ContextualSingleToSingle-sort">sort</a>(cmpfunc=None)&nbsp;--&nbsp;stable&nbsp;sort&nbsp;*IN&nbsp;PLACE*;&nbsp;cmpfunc(x,&nbsp;y)&nbsp;-&gt;&nbsp;-1,&nbsp;0,&nbsp;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> = &lt;built-in method __new__ of type object at 0xa866c57c&gt;<dd><tt>T.<a href="#ContextualSingleToSingle-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;object&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</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>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Random">class <strong>Random</strong></a>(<a href="__builtin__.html#dict">__builtin__.dict</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Replace&nbsp;a&nbsp;of&nbsp;glyph&nbsp;with&nbsp;randomly&nbsp;selected<br>
glyph&nbsp;from&nbsp;an&nbsp;established&nbsp;list&nbsp;of&nbsp;alternates.<br>
&nbsp;<br>
Behavior:&nbsp;<a href="__builtin__.html#dict">dict</a><br>
&nbsp;<br>
Substitution&nbsp;Structure:<br>
{<br>
glyph&nbsp;name&nbsp;:&nbsp;[alternates]<br>
}<br>
-&nbsp;typical&nbsp;structure<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'a'&nbsp;:&nbsp;['a.alt1',&nbsp;'a.alt2']<br>
&nbsp;<br>
Allows&nbsp;Sub-Lookups:&nbsp;No<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="robofab.features.substitute.html#Random">Random</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="Random-__init__"><strong>__init__</strong></a>(self, substitution)</dt></dl>
<dl><dt><a name="Random-processString"><strong>processString</strong></a>(self, glyphString)</dt></dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>__dict__</strong> = &lt;dictproxy object at 0x10bb090&gt;<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dl>
<dl><dt><strong>__weakref__</strong> = &lt;attribute '__weakref__' of 'Random' objects&gt;<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dl>
<hr>
Methods inherited from <a href="__builtin__.html#dict">__builtin__.dict</a>:<br>
<dl><dt><a name="Random-__cmp__"><strong>__cmp__</strong></a>(...)</dt><dd><tt>x.<a href="#Random-__cmp__">__cmp__</a>(y)&nbsp;&lt;==&gt;&nbsp;cmp(x,y)</tt></dd></dl>
<dl><dt><a name="Random-__contains__"><strong>__contains__</strong></a>(...)</dt><dd><tt>x.<a href="#Random-__contains__">__contains__</a>(y)&nbsp;&lt;==&gt;&nbsp;y&nbsp;in&nbsp;x</tt></dd></dl>
<dl><dt><a name="Random-__delitem__"><strong>__delitem__</strong></a>(...)</dt><dd><tt>x.<a href="#Random-__delitem__">__delitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;del&nbsp;x[y]</tt></dd></dl>
<dl><dt><a name="Random-__eq__"><strong>__eq__</strong></a>(...)</dt><dd><tt>x.<a href="#Random-__eq__">__eq__</a>(y)&nbsp;&lt;==&gt;&nbsp;x==y</tt></dd></dl>
<dl><dt><a name="Random-__ge__"><strong>__ge__</strong></a>(...)</dt><dd><tt>x.<a href="#Random-__ge__">__ge__</a>(y)&nbsp;&lt;==&gt;&nbsp;x&gt;=y</tt></dd></dl>
<dl><dt><a name="Random-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#Random-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>
<dl><dt><a name="Random-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#Random-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>
<dl><dt><a name="Random-__gt__"><strong>__gt__</strong></a>(...)</dt><dd><tt>x.<a href="#Random-__gt__">__gt__</a>(y)&nbsp;&lt;==&gt;&nbsp;x&gt;y</tt></dd></dl>
<dl><dt><a name="Random-__hash__"><strong>__hash__</strong></a>(...)</dt><dd><tt>x.<a href="#Random-__hash__">__hash__</a>()&nbsp;&lt;==&gt;&nbsp;hash(x)</tt></dd></dl>
<dl><dt><a name="Random-__iter__"><strong>__iter__</strong></a>(...)</dt><dd><tt>x.<a href="#Random-__iter__">__iter__</a>()&nbsp;&lt;==&gt;&nbsp;iter(x)</tt></dd></dl>
<dl><dt><a name="Random-__le__"><strong>__le__</strong></a>(...)</dt><dd><tt>x.<a href="#Random-__le__">__le__</a>(y)&nbsp;&lt;==&gt;&nbsp;x&lt;=y</tt></dd></dl>
<dl><dt><a name="Random-__len__"><strong>__len__</strong></a>(...)</dt><dd><tt>x.<a href="#Random-__len__">__len__</a>()&nbsp;&lt;==&gt;&nbsp;len(x)</tt></dd></dl>
<dl><dt><a name="Random-__lt__"><strong>__lt__</strong></a>(...)</dt><dd><tt>x.<a href="#Random-__lt__">__lt__</a>(y)&nbsp;&lt;==&gt;&nbsp;x&lt;y</tt></dd></dl>
<dl><dt><a name="Random-__ne__"><strong>__ne__</strong></a>(...)</dt><dd><tt>x.<a href="#Random-__ne__">__ne__</a>(y)&nbsp;&lt;==&gt;&nbsp;x!=y</tt></dd></dl>
<dl><dt><a name="Random-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#Random-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>
<dl><dt><a name="Random-__setitem__"><strong>__setitem__</strong></a>(...)</dt><dd><tt>x.<a href="#Random-__setitem__">__setitem__</a>(i,&nbsp;y)&nbsp;&lt;==&gt;&nbsp;x[i]=y</tt></dd></dl>
<dl><dt><a name="Random-clear"><strong>clear</strong></a>(...)</dt><dd><tt>D.<a href="#Random-clear">clear</a>()&nbsp;-&gt;&nbsp;None.&nbsp;&nbsp;Remove&nbsp;all&nbsp;items&nbsp;from&nbsp;D.</tt></dd></dl>
<dl><dt><a name="Random-copy"><strong>copy</strong></a>(...)</dt><dd><tt>D.<a href="#Random-copy">copy</a>()&nbsp;-&gt;&nbsp;a&nbsp;shallow&nbsp;copy&nbsp;of&nbsp;D</tt></dd></dl>
<dl><dt><a name="Random-get"><strong>get</strong></a>(...)</dt><dd><tt>D.<a href="#Random-get">get</a>(k[,d])&nbsp;-&gt;&nbsp;D[k]&nbsp;if&nbsp;k&nbsp;in&nbsp;D,&nbsp;else&nbsp;d.&nbsp;&nbsp;d&nbsp;defaults&nbsp;to&nbsp;None.</tt></dd></dl>
<dl><dt><a name="Random-has_key"><strong>has_key</strong></a>(...)</dt><dd><tt>D.<a href="#Random-has_key">has_key</a>(k)&nbsp;-&gt;&nbsp;True&nbsp;if&nbsp;D&nbsp;has&nbsp;a&nbsp;key&nbsp;k,&nbsp;else&nbsp;False</tt></dd></dl>
<dl><dt><a name="Random-items"><strong>items</strong></a>(...)</dt><dd><tt>D.<a href="#Random-items">items</a>()&nbsp;-&gt;&nbsp;list&nbsp;of&nbsp;D's&nbsp;(key,&nbsp;value)&nbsp;pairs,&nbsp;as&nbsp;2-tuples</tt></dd></dl>
<dl><dt><a name="Random-iteritems"><strong>iteritems</strong></a>(...)</dt><dd><tt>D.<a href="#Random-iteritems">iteritems</a>()&nbsp;-&gt;&nbsp;an&nbsp;iterator&nbsp;over&nbsp;the&nbsp;(key,&nbsp;value)&nbsp;items&nbsp;of&nbsp;D</tt></dd></dl>
<dl><dt><a name="Random-iterkeys"><strong>iterkeys</strong></a>(...)</dt><dd><tt>D.<a href="#Random-iterkeys">iterkeys</a>()&nbsp;-&gt;&nbsp;an&nbsp;iterator&nbsp;over&nbsp;the&nbsp;keys&nbsp;of&nbsp;D</tt></dd></dl>
<dl><dt><a name="Random-itervalues"><strong>itervalues</strong></a>(...)</dt><dd><tt>D.<a href="#Random-itervalues">itervalues</a>()&nbsp;-&gt;&nbsp;an&nbsp;iterator&nbsp;over&nbsp;the&nbsp;values&nbsp;of&nbsp;D</tt></dd></dl>
<dl><dt><a name="Random-keys"><strong>keys</strong></a>(...)</dt><dd><tt>D.<a href="#Random-keys">keys</a>()&nbsp;-&gt;&nbsp;list&nbsp;of&nbsp;D's&nbsp;keys</tt></dd></dl>
<dl><dt><a name="Random-pop"><strong>pop</strong></a>(...)</dt><dd><tt>D.<a href="#Random-pop">pop</a>(k[,d])&nbsp;-&gt;&nbsp;v,&nbsp;remove&nbsp;specified&nbsp;key&nbsp;and&nbsp;return&nbsp;the&nbsp;corresponding&nbsp;value<br>
If&nbsp;key&nbsp;is&nbsp;not&nbsp;found,&nbsp;d&nbsp;is&nbsp;returned&nbsp;if&nbsp;given,&nbsp;otherwise&nbsp;KeyError&nbsp;is&nbsp;raised</tt></dd></dl>
<dl><dt><a name="Random-popitem"><strong>popitem</strong></a>(...)</dt><dd><tt>D.<a href="#Random-popitem">popitem</a>()&nbsp;-&gt;&nbsp;(k,&nbsp;v),&nbsp;remove&nbsp;and&nbsp;return&nbsp;some&nbsp;(key,&nbsp;value)&nbsp;pair&nbsp;as&nbsp;a<br>
2-tuple;&nbsp;but&nbsp;raise&nbsp;KeyError&nbsp;if&nbsp;D&nbsp;is&nbsp;empty</tt></dd></dl>
<dl><dt><a name="Random-setdefault"><strong>setdefault</strong></a>(...)</dt><dd><tt>D.<a href="#Random-setdefault">setdefault</a>(k[,d])&nbsp;-&gt;&nbsp;D.<a href="#Random-get">get</a>(k,d),&nbsp;also&nbsp;set&nbsp;D[k]=d&nbsp;if&nbsp;k&nbsp;not&nbsp;in&nbsp;D</tt></dd></dl>
<dl><dt><a name="Random-update"><strong>update</strong></a>(...)</dt><dd><tt>D.<a href="#Random-update">update</a>(E)&nbsp;-&gt;&nbsp;None.&nbsp;&nbsp;Update&nbsp;D&nbsp;from&nbsp;E:&nbsp;for&nbsp;k&nbsp;in&nbsp;E.<a href="#Random-keys">keys</a>():&nbsp;D[k]&nbsp;=&nbsp;E[k]</tt></dd></dl>
<dl><dt><a name="Random-values"><strong>values</strong></a>(...)</dt><dd><tt>D.<a href="#Random-values">values</a>()&nbsp;-&gt;&nbsp;list&nbsp;of&nbsp;D's&nbsp;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> = &lt;built-in method __new__ of type object at 0xa866d054&gt;<dd><tt>T.<a href="#Random-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;object&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>
<dl><dt><strong>fromkeys</strong> = &lt;built-in method fromkeys of type object at 0x1150480&gt;<dd><tt><a href="__builtin__.html#dict">dict</a>.<a href="#Random-fromkeys">fromkeys</a>(S[,v])&nbsp;-&gt;&nbsp;New&nbsp;<a href="__builtin__.html#dict">dict</a>&nbsp;with&nbsp;keys&nbsp;from&nbsp;S&nbsp;and&nbsp;values&nbsp;equal&nbsp;to&nbsp;v.<br>
v&nbsp;defaults&nbsp;to&nbsp;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>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="SequenceToSingle">class <strong>SequenceToSingle</strong></a>(<a href="robofab.features.substitute.html#_BaseListFeature">_BaseListFeature</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Replace&nbsp;a&nbsp;sequence&nbsp;of&nbsp;glyphs&nbsp;with&nbsp;a&nbsp;single&nbsp;glyph.<br>
&nbsp;<br>
Behavior:&nbsp;list<br>
&nbsp;<br>
Substitution&nbsp;Structure:<br>
[<br>
(before,&nbsp;after)<br>
]<br>
-&nbsp;typical&nbsp;structure<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(['a',&nbsp;'b'],&nbsp;'a_b')<br>
&nbsp;<br>
Allows&nbsp;Sub-Lookups:&nbsp;Yes<br>
&nbsp;<br>
XXX&nbsp;NOT&nbsp;YET&nbsp;SUPPORTED:<br>
-before&nbsp;can&nbsp;be&nbsp;a&nbsp;list:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;([['a',&nbsp;'b'],&nbsp;['a.alt',&nbsp;'b.alt']],&nbsp;'a_b')<br>
-&nbsp;after&nbsp;can&nbsp;be&nbsp;a&nbsp;list&nbsp;as&nbsp;long&nbsp;as&nbsp;before&nbsp;is&nbsp;a&nbsp;list&nbsp;of&nbsp;the&nbsp;same&nbsp;length<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;([['a',&nbsp;'b'],&nbsp;['a.alt',&nbsp;'b.alt']],&nbsp;['a_b',&nbsp;'a.alt_b.alt'])<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="robofab.features.substitute.html#SequenceToSingle">SequenceToSingle</a></dd>
<dd><a href="robofab.features.substitute.html#_BaseListFeature">_BaseListFeature</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="SequenceToSingle-processString"><strong>processString</strong></a>(self, glyphString)</dt></dl>
<hr>
Methods inherited from <a href="robofab.features.substitute.html#_BaseListFeature">_BaseListFeature</a>:<br>
<dl><dt><a name="SequenceToSingle-__init__"><strong>__init__</strong></a>(self, substitution)</dt></dl>
<hr>
Data and other attributes inherited from <a href="robofab.features.substitute.html#_BaseListFeature">_BaseListFeature</a>:<br>
<dl><dt><strong>__dict__</strong> = &lt;dictproxy object at 0x10bb3b0&gt;<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dl>
<dl><dt><strong>__weakref__</strong> = &lt;attribute '__weakref__' of '_BaseListFeature' objects&gt;<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dl>
<hr>
Methods inherited from <a href="__builtin__.html#list">__builtin__.list</a>:<br>
<dl><dt><a name="SequenceToSingle-__add__"><strong>__add__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__add__">__add__</a>(y)&nbsp;&lt;==&gt;&nbsp;x+y</tt></dd></dl>
<dl><dt><a name="SequenceToSingle-__contains__"><strong>__contains__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__contains__">__contains__</a>(y)&nbsp;&lt;==&gt;&nbsp;y&nbsp;in&nbsp;x</tt></dd></dl>
<dl><dt><a name="SequenceToSingle-__delitem__"><strong>__delitem__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__delitem__">__delitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;del&nbsp;x[y]</tt></dd></dl>
<dl><dt><a name="SequenceToSingle-__delslice__"><strong>__delslice__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__delslice__">__delslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;del&nbsp;x[i:j]<br>
&nbsp;<br>
Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>
<dl><dt><a name="SequenceToSingle-__eq__"><strong>__eq__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__eq__">__eq__</a>(y)&nbsp;&lt;==&gt;&nbsp;x==y</tt></dd></dl>
<dl><dt><a name="SequenceToSingle-__ge__"><strong>__ge__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__ge__">__ge__</a>(y)&nbsp;&lt;==&gt;&nbsp;x&gt;=y</tt></dd></dl>
<dl><dt><a name="SequenceToSingle-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>
<dl><dt><a name="SequenceToSingle-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>
<dl><dt><a name="SequenceToSingle-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
&nbsp;<br>
Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>
<dl><dt><a name="SequenceToSingle-__gt__"><strong>__gt__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__gt__">__gt__</a>(y)&nbsp;&lt;==&gt;&nbsp;x&gt;y</tt></dd></dl>
<dl><dt><a name="SequenceToSingle-__hash__"><strong>__hash__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__hash__">__hash__</a>()&nbsp;&lt;==&gt;&nbsp;hash(x)</tt></dd></dl>
<dl><dt><a name="SequenceToSingle-__iadd__"><strong>__iadd__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__iadd__">__iadd__</a>(y)&nbsp;&lt;==&gt;&nbsp;x+=y</tt></dd></dl>
<dl><dt><a name="SequenceToSingle-__imul__"><strong>__imul__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__imul__">__imul__</a>(y)&nbsp;&lt;==&gt;&nbsp;x*=y</tt></dd></dl>
<dl><dt><a name="SequenceToSingle-__iter__"><strong>__iter__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__iter__">__iter__</a>()&nbsp;&lt;==&gt;&nbsp;iter(x)</tt></dd></dl>
<dl><dt><a name="SequenceToSingle-__le__"><strong>__le__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__le__">__le__</a>(y)&nbsp;&lt;==&gt;&nbsp;x&lt;=y</tt></dd></dl>
<dl><dt><a name="SequenceToSingle-__len__"><strong>__len__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__len__">__len__</a>()&nbsp;&lt;==&gt;&nbsp;len(x)</tt></dd></dl>
<dl><dt><a name="SequenceToSingle-__lt__"><strong>__lt__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__lt__">__lt__</a>(y)&nbsp;&lt;==&gt;&nbsp;x&lt;y</tt></dd></dl>
<dl><dt><a name="SequenceToSingle-__mul__"><strong>__mul__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__mul__">__mul__</a>(n)&nbsp;&lt;==&gt;&nbsp;x*n</tt></dd></dl>
<dl><dt><a name="SequenceToSingle-__ne__"><strong>__ne__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__ne__">__ne__</a>(y)&nbsp;&lt;==&gt;&nbsp;x!=y</tt></dd></dl>
<dl><dt><a name="SequenceToSingle-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>
<dl><dt><a name="SequenceToSingle-__rmul__"><strong>__rmul__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__rmul__">__rmul__</a>(n)&nbsp;&lt;==&gt;&nbsp;n*x</tt></dd></dl>
<dl><dt><a name="SequenceToSingle-__setitem__"><strong>__setitem__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__setitem__">__setitem__</a>(i,&nbsp;y)&nbsp;&lt;==&gt;&nbsp;x[i]=y</tt></dd></dl>
<dl><dt><a name="SequenceToSingle-__setslice__"><strong>__setslice__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__setslice__">__setslice__</a>(i,&nbsp;j,&nbsp;y)&nbsp;&lt;==&gt;&nbsp;x[i:j]=y<br>
&nbsp;<br>
Use&nbsp;&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>
<dl><dt><a name="SequenceToSingle-append"><strong>append</strong></a>(...)</dt><dd><tt>L.<a href="#SequenceToSingle-append">append</a>(object)&nbsp;--&nbsp;append&nbsp;object&nbsp;to&nbsp;end</tt></dd></dl>
<dl><dt><a name="SequenceToSingle-count"><strong>count</strong></a>(...)</dt><dd><tt>L.<a href="#SequenceToSingle-count">count</a>(value)&nbsp;-&gt;&nbsp;integer&nbsp;--&nbsp;return&nbsp;number&nbsp;of&nbsp;occurrences&nbsp;of&nbsp;value</tt></dd></dl>
<dl><dt><a name="SequenceToSingle-extend"><strong>extend</strong></a>(...)</dt><dd><tt>L.<a href="#SequenceToSingle-extend">extend</a>(iterable)&nbsp;--&nbsp;extend&nbsp;list&nbsp;by&nbsp;appending&nbsp;elements&nbsp;from&nbsp;the&nbsp;iterable</tt></dd></dl>
<dl><dt><a name="SequenceToSingle-index"><strong>index</strong></a>(...)</dt><dd><tt>L.<a href="#SequenceToSingle-index">index</a>(value,&nbsp;[start,&nbsp;[stop]])&nbsp;-&gt;&nbsp;integer&nbsp;--&nbsp;return&nbsp;first&nbsp;index&nbsp;of&nbsp;value</tt></dd></dl>
<dl><dt><a name="SequenceToSingle-insert"><strong>insert</strong></a>(...)</dt><dd><tt>L.<a href="#SequenceToSingle-insert">insert</a>(index,&nbsp;object)&nbsp;--&nbsp;insert&nbsp;object&nbsp;before&nbsp;index</tt></dd></dl>
<dl><dt><a name="SequenceToSingle-pop"><strong>pop</strong></a>(...)</dt><dd><tt>L.<a href="#SequenceToSingle-pop">pop</a>([index])&nbsp;-&gt;&nbsp;item&nbsp;--&nbsp;remove&nbsp;and&nbsp;return&nbsp;item&nbsp;at&nbsp;index&nbsp;(default&nbsp;last)</tt></dd></dl>
<dl><dt><a name="SequenceToSingle-remove"><strong>remove</strong></a>(...)</dt><dd><tt>L.<a href="#SequenceToSingle-remove">remove</a>(value)&nbsp;--&nbsp;remove&nbsp;first&nbsp;occurrence&nbsp;of&nbsp;value</tt></dd></dl>
<dl><dt><a name="SequenceToSingle-reverse"><strong>reverse</strong></a>(...)</dt><dd><tt>L.<a href="#SequenceToSingle-reverse">reverse</a>()&nbsp;--&nbsp;reverse&nbsp;*IN&nbsp;PLACE*</tt></dd></dl>
<dl><dt><a name="SequenceToSingle-sort"><strong>sort</strong></a>(...)</dt><dd><tt>L.<a href="#SequenceToSingle-sort">sort</a>(cmpfunc=None)&nbsp;--&nbsp;stable&nbsp;sort&nbsp;*IN&nbsp;PLACE*;&nbsp;cmpfunc(x,&nbsp;y)&nbsp;-&gt;&nbsp;-1,&nbsp;0,&nbsp;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> = &lt;built-in method __new__ of type object at 0xa866c57c&gt;<dd><tt>T.<a href="#SequenceToSingle-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;object&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</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>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="SingleToSingle">class <strong>SingleToSingle</strong></a>(<a href="robofab.features.substitute.html#_BaseListFeature">_BaseListFeature</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Replace&nbsp;a&nbsp;of&nbsp;glyph&nbsp;with&nbsp;another&nbsp;glyph.<br>
&nbsp;<br>
Behavior:&nbsp;list<br>
&nbsp;<br>
Substitution&nbsp;Structure:<br>
[<br>
(before,&nbsp;after)<br>
]<br>
-&nbsp;typical&nbsp;structure<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;('a',&nbsp;'a.alt')<br>
-before&nbsp;can&nbsp;be&nbsp;a&nbsp;list:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(['a',&nbsp;'a.alt1'],&nbsp;'a.alt2')<br>
-&nbsp;after&nbsp;can&nbsp;be&nbsp;a&nbsp;list&nbsp;as&nbsp;long&nbsp;as&nbsp;before&nbsp;is&nbsp;a&nbsp;list&nbsp;of&nbsp;the&nbsp;same&nbsp;length<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(['a',&nbsp;'b'],&nbsp;['a.alt',&nbsp;'b.alt'])<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
Allows&nbsp;Sub-Lookups:&nbsp;No<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="robofab.features.substitute.html#SingleToSingle">SingleToSingle</a></dd>
<dd><a href="robofab.features.substitute.html#_BaseListFeature">_BaseListFeature</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="SingleToSingle-processString"><strong>processString</strong></a>(self, glyphString)</dt></dl>
<hr>
Methods inherited from <a href="robofab.features.substitute.html#_BaseListFeature">_BaseListFeature</a>:<br>
<dl><dt><a name="SingleToSingle-__init__"><strong>__init__</strong></a>(self, substitution)</dt></dl>
<hr>
Data and other attributes inherited from <a href="robofab.features.substitute.html#_BaseListFeature">_BaseListFeature</a>:<br>
<dl><dt><strong>__dict__</strong> = &lt;dictproxy object at 0x5317d0&gt;<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dl>
<dl><dt><strong>__weakref__</strong> = &lt;attribute '__weakref__' of '_BaseListFeature' objects&gt;<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dl>
<hr>
Methods inherited from <a href="__builtin__.html#list">__builtin__.list</a>:<br>
<dl><dt><a name="SingleToSingle-__add__"><strong>__add__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__add__">__add__</a>(y)&nbsp;&lt;==&gt;&nbsp;x+y</tt></dd></dl>
<dl><dt><a name="SingleToSingle-__contains__"><strong>__contains__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__contains__">__contains__</a>(y)&nbsp;&lt;==&gt;&nbsp;y&nbsp;in&nbsp;x</tt></dd></dl>
<dl><dt><a name="SingleToSingle-__delitem__"><strong>__delitem__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__delitem__">__delitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;del&nbsp;x[y]</tt></dd></dl>
<dl><dt><a name="SingleToSingle-__delslice__"><strong>__delslice__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__delslice__">__delslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;del&nbsp;x[i:j]<br>
&nbsp;<br>
Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>
<dl><dt><a name="SingleToSingle-__eq__"><strong>__eq__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__eq__">__eq__</a>(y)&nbsp;&lt;==&gt;&nbsp;x==y</tt></dd></dl>
<dl><dt><a name="SingleToSingle-__ge__"><strong>__ge__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__ge__">__ge__</a>(y)&nbsp;&lt;==&gt;&nbsp;x&gt;=y</tt></dd></dl>
<dl><dt><a name="SingleToSingle-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>
<dl><dt><a name="SingleToSingle-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>
<dl><dt><a name="SingleToSingle-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
&nbsp;<br>
Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>
<dl><dt><a name="SingleToSingle-__gt__"><strong>__gt__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__gt__">__gt__</a>(y)&nbsp;&lt;==&gt;&nbsp;x&gt;y</tt></dd></dl>
<dl><dt><a name="SingleToSingle-__hash__"><strong>__hash__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__hash__">__hash__</a>()&nbsp;&lt;==&gt;&nbsp;hash(x)</tt></dd></dl>
<dl><dt><a name="SingleToSingle-__iadd__"><strong>__iadd__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__iadd__">__iadd__</a>(y)&nbsp;&lt;==&gt;&nbsp;x+=y</tt></dd></dl>
<dl><dt><a name="SingleToSingle-__imul__"><strong>__imul__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__imul__">__imul__</a>(y)&nbsp;&lt;==&gt;&nbsp;x*=y</tt></dd></dl>
<dl><dt><a name="SingleToSingle-__iter__"><strong>__iter__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__iter__">__iter__</a>()&nbsp;&lt;==&gt;&nbsp;iter(x)</tt></dd></dl>
<dl><dt><a name="SingleToSingle-__le__"><strong>__le__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__le__">__le__</a>(y)&nbsp;&lt;==&gt;&nbsp;x&lt;=y</tt></dd></dl>
<dl><dt><a name="SingleToSingle-__len__"><strong>__len__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__len__">__len__</a>()&nbsp;&lt;==&gt;&nbsp;len(x)</tt></dd></dl>
<dl><dt><a name="SingleToSingle-__lt__"><strong>__lt__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__lt__">__lt__</a>(y)&nbsp;&lt;==&gt;&nbsp;x&lt;y</tt></dd></dl>
<dl><dt><a name="SingleToSingle-__mul__"><strong>__mul__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__mul__">__mul__</a>(n)&nbsp;&lt;==&gt;&nbsp;x*n</tt></dd></dl>
<dl><dt><a name="SingleToSingle-__ne__"><strong>__ne__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__ne__">__ne__</a>(y)&nbsp;&lt;==&gt;&nbsp;x!=y</tt></dd></dl>
<dl><dt><a name="SingleToSingle-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>
<dl><dt><a name="SingleToSingle-__rmul__"><strong>__rmul__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__rmul__">__rmul__</a>(n)&nbsp;&lt;==&gt;&nbsp;n*x</tt></dd></dl>
<dl><dt><a name="SingleToSingle-__setitem__"><strong>__setitem__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__setitem__">__setitem__</a>(i,&nbsp;y)&nbsp;&lt;==&gt;&nbsp;x[i]=y</tt></dd></dl>
<dl><dt><a name="SingleToSingle-__setslice__"><strong>__setslice__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__setslice__">__setslice__</a>(i,&nbsp;j,&nbsp;y)&nbsp;&lt;==&gt;&nbsp;x[i:j]=y<br>
&nbsp;<br>
Use&nbsp;&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>
<dl><dt><a name="SingleToSingle-append"><strong>append</strong></a>(...)</dt><dd><tt>L.<a href="#SingleToSingle-append">append</a>(object)&nbsp;--&nbsp;append&nbsp;object&nbsp;to&nbsp;end</tt></dd></dl>
<dl><dt><a name="SingleToSingle-count"><strong>count</strong></a>(...)</dt><dd><tt>L.<a href="#SingleToSingle-count">count</a>(value)&nbsp;-&gt;&nbsp;integer&nbsp;--&nbsp;return&nbsp;number&nbsp;of&nbsp;occurrences&nbsp;of&nbsp;value</tt></dd></dl>
<dl><dt><a name="SingleToSingle-extend"><strong>extend</strong></a>(...)</dt><dd><tt>L.<a href="#SingleToSingle-extend">extend</a>(iterable)&nbsp;--&nbsp;extend&nbsp;list&nbsp;by&nbsp;appending&nbsp;elements&nbsp;from&nbsp;the&nbsp;iterable</tt></dd></dl>
<dl><dt><a name="SingleToSingle-index"><strong>index</strong></a>(...)</dt><dd><tt>L.<a href="#SingleToSingle-index">index</a>(value,&nbsp;[start,&nbsp;[stop]])&nbsp;-&gt;&nbsp;integer&nbsp;--&nbsp;return&nbsp;first&nbsp;index&nbsp;of&nbsp;value</tt></dd></dl>
<dl><dt><a name="SingleToSingle-insert"><strong>insert</strong></a>(...)</dt><dd><tt>L.<a href="#SingleToSingle-insert">insert</a>(index,&nbsp;object)&nbsp;--&nbsp;insert&nbsp;object&nbsp;before&nbsp;index</tt></dd></dl>
<dl><dt><a name="SingleToSingle-pop"><strong>pop</strong></a>(...)</dt><dd><tt>L.<a href="#SingleToSingle-pop">pop</a>([index])&nbsp;-&gt;&nbsp;item&nbsp;--&nbsp;remove&nbsp;and&nbsp;return&nbsp;item&nbsp;at&nbsp;index&nbsp;(default&nbsp;last)</tt></dd></dl>
<dl><dt><a name="SingleToSingle-remove"><strong>remove</strong></a>(...)</dt><dd><tt>L.<a href="#SingleToSingle-remove">remove</a>(value)&nbsp;--&nbsp;remove&nbsp;first&nbsp;occurrence&nbsp;of&nbsp;value</tt></dd></dl>
<dl><dt><a name="SingleToSingle-reverse"><strong>reverse</strong></a>(...)</dt><dd><tt>L.<a href="#SingleToSingle-reverse">reverse</a>()&nbsp;--&nbsp;reverse&nbsp;*IN&nbsp;PLACE*</tt></dd></dl>
<dl><dt><a name="SingleToSingle-sort"><strong>sort</strong></a>(...)</dt><dd><tt>L.<a href="#SingleToSingle-sort">sort</a>(cmpfunc=None)&nbsp;--&nbsp;stable&nbsp;sort&nbsp;*IN&nbsp;PLACE*;&nbsp;cmpfunc(x,&nbsp;y)&nbsp;-&gt;&nbsp;-1,&nbsp;0,&nbsp;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> = &lt;built-in method __new__ of type object at 0xa866c57c&gt;<dd><tt>T.<a href="#SingleToSingle-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;object&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</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>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Substitute">class <strong>Substitute</strong></a>(<a href="robofab.features.featureTools.html#SortedDict">robofab.features.featureTools.SortedDict</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>The&nbsp;main&nbsp;substitution&nbsp;object.<br>
&nbsp;<br>
-All&nbsp;features&nbsp;should&nbsp;be&nbsp;registered&nbsp;by&nbsp;passing<br>
a&nbsp;feature&nbsp;name&nbsp;and&nbsp;a&nbsp;substitution&nbsp;structure<br>
to&nbsp;the&nbsp;registerFeature&nbsp;method.<br>
&nbsp;<br>
-Glyph&nbsp;lists&nbsp;are&nbsp;prcessed&nbsp;with&nbsp;the&nbsp;processGlyphList<br>
method.&nbsp;This&nbsp;will&nbsp;send&nbsp;back&nbsp;a&nbsp;list&nbsp;of&nbsp;glyphs&nbsp;that&nbsp;have<br>
been&nbsp;processed&nbsp;according&nbsp;to&nbsp;the&nbsp;available&nbsp;features.<br>
&nbsp;<br>
-To&nbsp;turn&nbsp;a&nbsp;feature&nbsp;on&nbsp;or&nbsp;off,&nbsp;call&nbsp;it&nbsp;as&nbsp;you&nbsp;would&nbsp;a&nbsp;<a href="__builtin__.html#dict">dict</a><br>
and&nbsp;set&nbsp;the&nbsp;"on"&nbsp;attribute.<br>
&nbsp;<br>
need&nbsp;to&nbsp;support:<br>
order():&nbsp;return&nbsp;and&nbsp;ordered&nbsp;list&nbsp;of&nbsp;all&nbsp;features&nbsp;that&nbsp;are&nbsp;on<br>
setOrder(list):&nbsp;set&nbsp;the&nbsp;firing&nbsp;order<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="robofab.features.substitute.html#Substitute">Substitute</a></dd>
<dd><a href="robofab.features.featureTools.html#SortedDict">robofab.features.featureTools.SortedDict</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="Substitute-processGlyphList"><strong>processGlyphList</strong></a>(self, glyphList)</dt></dl>
<dl><dt><a name="Substitute-registerFeature"><strong>registerFeature</strong></a>(self, name, typeOfFeature, substitution)</dt></dl>
<hr>
Methods inherited from <a href="robofab.features.featureTools.html#SortedDict">robofab.features.featureTools.SortedDict</a>:<br>
<dl><dt><a name="Substitute-__getitem__"><strong>__getitem__</strong></a>(self, key)</dt></dl>
<dl><dt><a name="Substitute-__init__"><strong>__init__</strong></a>(self)</dt></dl>
<dl><dt><a name="Substitute-__len__"><strong>__len__</strong></a>(self)</dt></dl>
<dl><dt><a name="Substitute-__setitem__"><strong>__setitem__</strong></a>(self, key, value)</dt></dl>
<dl><dt><a name="Substitute-clear"><strong>clear</strong></a>(self)</dt></dl>
<dl><dt><a name="Substitute-copy"><strong>copy</strong></a>(self)</dt></dl>
<dl><dt><a name="Substitute-get"><strong>get</strong></a>(self, key, default<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="Substitute-has_key"><strong>has_key</strong></a>(self, key)</dt></dl>
<dl><dt><a name="Substitute-items"><strong>items</strong></a>(self)</dt></dl>
<dl><dt><a name="Substitute-keys"><strong>keys</strong></a>(self)</dt></dl>
<dl><dt><a name="Substitute-update"><strong>update</strong></a>(self, other)</dt></dl>
<dl><dt><a name="Substitute-values"><strong>values</strong></a>(self)</dt></dl>
<hr>
Data and other attributes inherited from <a href="robofab.features.featureTools.html#SortedDict">robofab.features.featureTools.SortedDict</a>:<br>
<dl><dt><strong>__dict__</strong> = &lt;dictproxy object at 0x531890&gt;<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dl>
<dl><dt><strong>__weakref__</strong> = &lt;attribute '__weakref__' of 'SortedDict' objects&gt;<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</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>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-breakGlyphString"><strong>breakGlyphString</strong></a>(glyphString)</dt><dd><tt>take&nbsp;a&nbsp;/&nbsp;delimited&nbsp;list&nbsp;with&nbsp;and&nbsp;turn<br>
it&nbsp;into&nbsp;a&nbsp;list&nbsp;of&nbsp;glyph&nbsp;names<br>
'/a/b/c/'&nbsp;-&gt;&nbsp;['a',&nbsp;'b',&nbsp;'c']</tt></dd></dl>
<dl><dt><a name="-makeGlyphString"><strong>makeGlyphString</strong></a>(glyphList)</dt><dd><tt>take&nbsp;a&nbsp;list&nbsp;of&nbsp;glyph&nbsp;names&nbsp;and&nbsp;turn&nbsp;them&nbsp;into<br>
a&nbsp;/&nbsp;delimited&nbsp;list&nbsp;with&nbsp;a&nbsp;preceding&nbsp;and&nbsp;following&nbsp;/<br>
['a',&nbsp;'b',&nbsp;'c']&nbsp;-&gt;&nbsp;'/a/b/c/'</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>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>CNTX_SING_2_SING</strong> = 'contextual_single_to_single'<br>
<strong>RAND</strong> = 'random'<br>
<strong>SAFE_NONE</strong> = &lt;robofab.features.featureTools.SafeNone object at 0x52a810&gt;<br>
<strong>SEP_MARK</strong> = '/'<br>
<strong>SEQ_2_SING</strong> = 'sequence_to_single'<br>
<strong>SING_2_SING</strong> = 'single_to_single'</td></tr></table>
</body></html>