comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:3c3522ce6e3a
1 def getlist(string, separator=','):
2 if not string:
3 return []
4 _list = [ i.strip() for i in string.split(',') ]
5 if not _list:
6 return _list
7 if not _list[-1]:
8 return _list[:-1]
9 return _list
10
11 def getbool(string):
12 return string.strip().lower() == 'true'
13