Changeset 185 for trunk/small-hacks/python
- Timestamp:
- 07/16/08 13:56:38 (6 months ago)
- Files:
-
- trunk/small-hacks/python/loblaw/openerp/import.py (modified) (2 diffs)
- trunk/small-hacks/python/tests (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/small-hacks/python/loblaw/openerp/import.py
r183 r185 12 12 13 13 import xmlrpclib,pgdb 14 import libxml2 15 import libxslt 14 16 from string import join 15 17 … … 30 32 either be a fully qualified path name to a configuration file, or the 31 33 string representing the XML.""" 32 pass 34 self.exporter = exporter 35 self.settings = {} 36 if config.find("<?xml") == 0: 37 self.settings['doc'] = libxml2.parseMemory(settings_xml_server, len(settings_xml_server)) 38 self.settings['header'] = settings.doc.xpathNewContext() 39 else: 40 self.settings['doc'] = libxml2.parseFile(config) 41 self.settings['header'] = self.doc.xpathNewContext() 42 33 43 def import(): 34 44 """import performs the actual import operation from the foreign