Return a list from a ConfigParser option. By default, split on a comma and strip whitespaces.
1 2 3 4 | 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) ]
|