231 "keywords" : keywords, |
230 "keywords" : keywords, |
232 "files" : files, |
231 "files" : files, |
233 } |
232 } |
234 |
233 |
235 txt = self.__convertEol(HelpProject.format(**helpAttribs), newline) |
234 txt = self.__convertEol(HelpProject.format(**helpAttribs), newline) |
236 f = codecs.open(os.path.join(self.outputDir, HelpProjectFile), 'w', 'utf-8') |
235 f = open(os.path.join(self.outputDir, HelpProjectFile), "w", |
|
236 encoding = "utf-8", newline = newline) |
237 f.write(txt) |
237 f.write(txt) |
238 f.close() |
238 f.close() |
239 |
239 |
240 if self.createCollection and \ |
240 if self.createCollection and \ |
241 not os.path.exists(os.path.join(self.outputDir, HelpCollectionProjectFile)): |
241 not os.path.exists(os.path.join(self.outputDir, HelpCollectionProjectFile)): |
242 collectionAttribs = { |
242 collectionAttribs = { |
243 "helpfile" : HelpHelpFile, |
243 "helpfile" : HelpHelpFile, |
244 } |
244 } |
245 |
245 |
246 txt = self.__convertEol(HelpCollection.format(**collectionAttribs), newline) |
246 txt = self.__convertEol(HelpCollection.format(**collectionAttribs), newline) |
247 f = codecs.open(os.path.join(self.outputDir, HelpCollectionProjectFile), |
247 f = open(os.path.join(self.outputDir, HelpCollectionProjectFile), |
248 'w', 'utf-8') |
248 "w", encoding = "utf-8", newline = newline) |
249 f.write(txt) |
249 f.write(txt) |
250 f.close() |
250 f.close() |
251 |
251 |
252 sys.stdout.write("QtHelp files written.\n") |
252 sys.stdout.write("QtHelp files written.\n") |
253 sys.stdout.write("Generating QtHelp documentation...\n") |
253 sys.stdout.write("Generating QtHelp documentation...\n") |