shutil.copyfile(sTemplateDir+"SCRCover.odt",tempdir+"essai.odt") templateFile = zipfile.ZipFile(tempdir+"essai.odt","r") contentXml = templateFile.read("content.xml") contentInfo = templateFile.getinfo("content.xml") templateFile.close() logfile = open(tempdir+'test.log','w') logfile.write(contentXml) logfile.close() ###/test### lScrContent = {} oObj = oLibrary.getObject(objectOID,0) contentXml = oo.writeOOContent(contentXml,getScrContent(lScrContent, oObj)) ###test### templateFile = zipfile.ZipFile(tempdir+"essai.odt","a") templateFile.writestr(contentInfo,contentXml) templateFile.close() ###/test### wait(60,expPath+"essai.odt","timeout packaging essai.odt") convert(expPath,"essai.odt")