Changeset 4337
- Timestamp:
- 23 Jun 2009, 09:56:31 (16 years ago)
- Location:
- waeup/branches/ulif-rewrite/src/waeup/csvfile
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup/branches/ulif-rewrite/src/waeup/csvfile/README.txt
r4288 r4337 84 84 85 85 :func:`getCSVFile` 86 ------------------ ----86 ------------------ 87 87 88 88 .. function:: getCSVFile(filepath) … … 102 102 103 103 :ref:`getcsvfiledecision` 104 105 Helpers 106 ======= 107 108 Some helper functions provide convenience methods for handling CSV 109 data. 110 111 :func:`toBool` 112 -------------- 113 114 .. function:: toBool(string) 115 116 `string` 117 String containing some CSV data. 118 119 Turn a string into a boolean value. 120 121 If the string contains one of the values ``'true'``, ``'yes'``, 122 ``'y'``, ``'on'`` or ``'checked'`` then ``True`` is returned, 123 ``False`` otherwise. 124 125 The string can be uppercase, lowercase or mixed: 126 127 >>> from waeup.csvfile import toBool 128 >>> toBool('y') 129 True 130 131 >>> toBool('Yes') 132 True 133 134 >>> toBool('TRUE') 135 True 104 136 105 137 Basic example -
waeup/branches/ulif-rewrite/src/waeup/csvfile/__init__.py
r4219 r4337 1 1 # Make this a package. 2 2 from waeup.csvfile.csvfile import getCSVFile, CSVFile 3 from waeup.csvfile.util import toBool
Note: See TracChangeset for help on using the changeset viewer.