Mercurial > hg > martINI
view martini/utils.py @ 16:8ae3a7fd466a
py3
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Mon, 20 Feb 2017 14:56:46 -0800 |
parents | 3c3522ce6e3a |
children |
line wrap: on
line source
def getlist(string, separator=','): if not string: return [] _list = [ i.strip() for i in string.split(',') ] if not _list: return _list if not _list[-1]: return _list[:-1] return _list def getbool(string): return string.strip().lower() == 'true'