On Wed, 14 Nov 2012 23:14:34 -0800
Keith Dart <[email protected]> wrote:
> Here is a widget I recently created for a project.
Oops, forgot to add this helper function.
I guess this should be a method.
def prefix_index(thelist, prefix, index=0):
while index < len(thelist):
if thelist[index].startswith(prefix):
return index
index += 1
return None
--
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Keith Dart <[email protected]>
public key: ID: 19017044
<http://www.dartworks.biz/>
=====================================================================
_______________________________________________
Urwid mailing list
[email protected]
http://lists.excess.org/mailman/listinfo/urwid