"""Helpers for CSV import/export. """ ## type casts def toBool(string): if not isinstance(string, basestring): return string string = string.lower() if string in ['true', 'yes', 'y', 'on', 'checked']: return True return False