def getlist(option, sep=',', chars=None):
"""Return a list from a ConfigParser option. By default,
split on a comma and strip whitespaces."""
return [ chunk.strip(chars) for chunk in option.split(sep) ]
Diff to Previous Revision
--- revision 1 2011-05-13 13:52:54
+++ revision 2 2011-05-13 13:53:56
@@ -1,4 +1,4 @@
def getlist(option, sep=',', chars=None):
"""Return a list from a ConfigParser option. By default,
- splits on a comma and strip whitespaces."""
+ split on a comma and strip whitespaces."""
return [ chunk.strip(chars) for chunk in option.split(sep) ]