view martini/utils.py @ 0:3c3522ce6e3a

initial import of martINI from https://svn.openplans.org/svn/standalone/martINI/
author k0s <k0scist@gmail.com>
date Tue, 08 Dec 2009 15:13:28 -0500
parents
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'