Changeset 4969
- Timestamp:
- 1 Feb 2010, 16:36:08 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/interfaces.py
r4920 r4969 314 314 315 315 Returns a Python object. 316 """317 318 class IWAeUPCSVExporter(Interface):319 """A CSV exporter for objects.320 """321 322 def export(obj, filepath=None):323 """Export as CSV.324 325 Returns a CSV representation of `obj`.326 327 If `filepath` is ``None``, a StringIO` object is returned,328 that contains the transformed data.329 """330 331 class IWAeUPCSVImporter(Interface):332 """A CSV importer for objects.333 """334 datatype = schema.TextLine(335 title = u'Data type',336 description = u'Type of data supported by this filter.',337 required = True,)338 339 def doImport(clear_old_data=True, overwrite=True):340 """Read data from `filepath` and apply data.341 342 It depends on the context, what 'applying data' means here.343 344 If `clear_old_data` is False, old data will be345 preserved. Otherwise all old data will get lost.346 347 If `overwrite` is False, any existing entries with similar348 keys might be overwritten. This option is ignored, when349 `clear_old_data` is set to True.350 316 """ 351 317 … … 417 383 pass 418 384 419 class ICSVDataReceivers(Interface):420 """An object containing things ready for CSV imports.421 422 This is pure marker interface. Objects that implement it, indicate423 that they might provide attributes, which are able to receive CSV424 data, i.e. for which an IWAeUPCSVDataImporter exists.425 """426 427 385 class IDataCenterFile(Interface): 428 386 """A data center file.
Note: See TracChangeset for help on using the changeset viewer.