Changeset 4040 for waeup/branches/ulif-rewrite
- Timestamp:
- 1 Apr 2009, 16:26:54 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup/branches/ulif-rewrite/src/waeup/utils/importexport.py
r3932 r4040 107 107 else: 108 108 filelike_obj = open(filepath, 'wb') 109 filelike_obj.write(result.to prettyxml(encoding='UTF-8'))109 filelike_obj.write(result.toxml(encoding='UTF-8')) 110 110 filelike_obj.seek(0) 111 111 self.cleanUp() 112 112 return filelike_obj 113 113 114 def exportPrettyXML(self, obj ):114 def exportPrettyXML(self, obj, filepath=None): 115 115 result = self._export(obj).toprettyxml(encoding='UTF-8') 116 if filepath is None: 117 filelike_obj = StringIO() 118 else: 119 filelike_obj = open(filepath, 'wb') 120 filelike_obj.write(result) 121 filelike_obj.seek(0) 116 122 self.cleanUp() 117 return result123 return filelike_obj
Note: See TracChangeset for help on using the changeset viewer.