Changeset 7321 for main/waeup.sirp/trunk/src/waeup/sirp/utils
- Timestamp:
- 10 Dec 2011, 06:15:17 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/utils
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/utils/batching.py
r7273 r7321 16 16 ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 17 ## 18 """ WAeUP components for batch processing.18 """SIRP components for batch processing. 19 19 20 20 Batch processors eat CSV files to add, update or remove large numbers -
main/waeup.sirp/trunk/src/waeup/sirp/utils/converters.txt
r6276 r7321 10 10 11 11 .. :NOdoctest: 12 .. :NOlayer: waeup.sirp.testing. WAeUPSIRPUnitTestLayer12 .. :NOlayer: waeup.sirp.testing.SIRPUnitTestLayer 13 13 14 14 … … 672 672 '1' 673 673 674 >>> from waeup.sirp.interfaces import Simple WAeUPVocabulary674 >>> from waeup.sirp.interfaces import SimpleSIRPVocabulary 675 675 >>> field = Choice( 676 676 ... title = u'Favourite Dish', 677 677 ... default = 0, 678 ... vocabulary = Simple WAeUPVocabulary(678 ... vocabulary = SimpleSIRPVocabulary( 679 679 ... ('N/A', 0), ('Pizza', 1), 680 680 ... ('Cake', 2), ('Muffins', 3)), -
main/waeup.sirp/trunk/src/waeup/sirp/utils/helpers.py
r7240 r7321 16 16 ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 17 ## 18 """General helper functions for WAeUP.18 """General helper functions for SIRP. 19 19 """ 20 20 import os -
main/waeup.sirp/trunk/src/waeup/sirp/utils/helpers.txt
r7186 r7321 1 :mod:`waeup.sirp.utils.helpers` -- Helpers for the WAeUP SRP2 *************************************************** *********1 :mod:`waeup.sirp.utils.helpers` -- Helpers for SIRP 2 *************************************************** 3 3 4 4 .. module:: waeup.sirp.utils.helpers 5 5 6 Helper functions for the WAeUP SRP.6 Helper functions for SIRP. 7 7 8 8 .. :doctest: -
main/waeup.sirp/trunk/src/waeup/sirp/utils/importexport.py
r7196 r7321 22 22 from cStringIO import StringIO 23 23 from zope.interface import Interface 24 from waeup.sirp.interfaces import (I WAeUPObject, IWAeUPExporter,25 I WAeUPXMLExporter, IWAeUPXMLImporter)24 from waeup.sirp.interfaces import (ISIRPObject, ISIRPExporter, 25 ISIRPXMLExporter, ISIRPXMLImporter) 26 26 27 27 def readFile(f): … … 40 40 41 41 class Exporter(grok.Adapter): 42 """Export a WAeUP object as pickle.42 """Export a SIRP object as pickle. 43 43 44 44 This all-purpose exporter exports attributes defined in schemata 45 45 and contained objects (if the exported thing is a container). 46 46 """ 47 grok.context(I WAeUPObject)48 grok.provides(I WAeUPExporter)47 grok.context(ISIRPObject) 48 grok.provides(ISIRPExporter) 49 49 50 50 def __init__(self, context): … … 61 61 62 62 class XMLExporter(grok.Adapter): 63 """Export a WAeUP object as XML.63 """Export a SIRP object as XML. 64 64 65 65 This all-purpose exporter exports XML representations of pickable … … 67 67 """ 68 68 grok.context(Interface) 69 grok.provides(I WAeUPXMLExporter)69 grok.provides(ISIRPXMLExporter) 70 70 71 71 def __init__(self, context): … … 84 84 85 85 class XMLImporter(grok.Adapter): 86 """Import a WAeUP object from XML.86 """Import a SIRP object from XML. 87 87 """ 88 88 grok.context(Interface) 89 grok.provides(I WAeUPXMLImporter)89 grok.provides(ISIRPXMLImporter) 90 90 91 91 def __init__(self, context): -
main/waeup.sirp/trunk/src/waeup/sirp/utils/importexport.txt
r5140 r7321 6 6 7 7 .. :doctest: 8 .. :layer: waeup.sirp.testing. WAeUPSIRPUnitTestLayer8 .. :layer: waeup.sirp.testing.SIRPUnitTestLayer 9 9 10 10 As imports and exports of data are a cruical point when doing updates … … 60 60 an exporter:: 61 61 62 >>> from waeup.sirp.interfaces import I WAeUPXMLExporter63 >>> exporter = I WAeUPXMLExporter(mycave)62 >>> from waeup.sirp.interfaces import ISIRPXMLExporter 63 >>> exporter = ISIRPXMLExporter(mycave) 64 64 >>> exporter 65 65 <waeup.sirp.utils.importexport.XMLExporter object at 0x...> … … 101 101 Now we create an importer for that object: 102 102 103 >>> from waeup.sirp.interfaces import I WAeUPXMLImporter104 >>> importer = I WAeUPXMLImporter(mycave)103 >>> from waeup.sirp.interfaces import ISIRPXMLImporter 104 >>> importer = ISIRPXMLImporter(mycave) 105 105 106 106 Importing from filenames -
main/waeup.sirp/trunk/src/waeup/sirp/utils/tests/test_converters.py
r7196 r7321 36 36 from waeup.sirp.utils.converters import IObjectConverter 37 37 from waeup.sirp.utils.helpers import attrs_to_fields 38 from waeup.sirp.interfaces import Simple WAeUPVocabulary39 40 colors = Simple WAeUPVocabulary(38 from waeup.sirp.interfaces import SimpleSIRPVocabulary 39 40 colors = SimpleSIRPVocabulary( 41 41 ('Red', u'red'), 42 42 ('Green', u'green'), 43 43 ('Blue', u'blue'), 44 44 ) 45 car_nums = Simple WAeUPVocabulary(45 car_nums = SimpleSIRPVocabulary( 46 46 ('None', 0), 47 47 ('One', 1),
Note: See TracChangeset for help on using the changeset viewer.