| Trees | Indices | Help |
|
|---|
|
|
String processing utilities.
Author: Mark Granroth-Wilding <mark.granroth-wilding@ed.ac.uk>
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
TRUE_STRINGS =
|
|||
__package__ = Nonehash(x) |
|||
|
|||
I'm fed up of typing this every time I want to print a list! This is nothing more than: return sep.join(["%s" % item for item in list]) |
Format a float as a string in a style suitable for displaying probabilities. This is not a particularly quick procedure. If you need to format lots of probabilities, it's probably best to do something cruder. |
Handy utility for concise readable output of a list of name that includes many that differ only by a numerical suffix. For example, ['model0','model1','model2'] is better represented as 'model{0-2}'. Given a list of items, return a potentially smaller list, with all names differing only by a numerical suffix condensed into a single item, using {} to denote the suffix and using ranges where possible, otherwise comma-separated lists. |
Ensures that there are no duplicate strings in a list of strings. Wherever a duplicate is found, it is distinguished by appending an integer. |
Normalizes string, converts to lowercase, removes non-alpha characters, and converts spaces to hyphens. Lifted straight from Django's slugify function. |
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Mon Nov 26 16:04:56 2012 | http://epydoc.sourceforge.net |