Home | Trees | Indices | Help |
|
---|
|
Classes | |
LRUCache A dictionary-like object that stores only a certain number of items, and discards its least recently used item when full. |
Functions | |||
|
|||
|
|||
|
|||
|
|||
|
Variables | |
__package__ =
|
Function Details |
Flattens a potentially nested sequence into a flat list. >>> flatten((1, 2)) [1, 2] >>> flatten([1, (2, 3), 4]) [1, 2, 3, 4] >>> flatten([1, (2, [3, 4]), 5]) [1, 2, 3, 4, 5]
|
Return the text with all entities and tags removed. >>> plaintext('<b>1 < 2</b>') u'1 < 2' The >>> plaintext('''<b>1 ... < ... 2</b>''', keeplinebreaks=False) u'1 < 2'
|
Return a copy of the given text with any character or numeric entities replaced by the equivalent UTF-8 characters. >>> stripentities('1 < 2') u'1 < 2' >>> stripentities('more …') u'more \u2026' >>> stripentities('…') u'\u2026' >>> stripentities('…') u'\u2026' If the >>> stripentities('1 < 2 …', keepxmlentities=True) u'1 < 2 \u2026' |
Return a copy of the text with any XML/HTML tags removed. >>> striptags('<span>Foo</span> bar') 'Foo bar' >>> striptags('<span class="bar">Foo</span>') 'Foo' >>> striptags('Foo<br />') 'Foo' HTML/XML comments are stripped, too: >>> striptags('<!-- <blub>hehe</blah> -->test') 'test'
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu Apr 22 14:10:36 2010 | http://epydoc.sourceforge.net |