242 "keywords": keywords, |
242 "keywords": keywords, |
243 "files": files, |
243 "files": files, |
244 } |
244 } |
245 |
245 |
246 txt = self.__convertEol(HelpProject.format(**helpAttribs), newline) |
246 txt = self.__convertEol(HelpProject.format(**helpAttribs), newline) |
247 f = open(os.path.join(self.outputDir, HelpProjectFile), "w", |
247 with open(os.path.join(self.outputDir, HelpProjectFile), "w", |
248 encoding="utf-8", newline=newline) |
248 encoding="utf-8", newline=newline) as f: |
249 f.write(txt) |
249 f.write(txt) |
250 f.close() |
|
251 |
250 |
252 if ( |
251 if ( |
253 self.createCollection and |
252 self.createCollection and |
254 not os.path.exists(os.path.join( |
253 not os.path.exists(os.path.join( |
255 self.outputDir, HelpCollectionProjectFile)) |
254 self.outputDir, HelpCollectionProjectFile)) |
258 "helpfile": HelpHelpFile, |
257 "helpfile": HelpHelpFile, |
259 } |
258 } |
260 |
259 |
261 txt = self.__convertEol( |
260 txt = self.__convertEol( |
262 HelpCollection.format(**collectionAttribs), newline) |
261 HelpCollection.format(**collectionAttribs), newline) |
263 f = open(os.path.join(self.outputDir, HelpCollectionProjectFile), |
262 with open(os.path.join(self.outputDir, HelpCollectionProjectFile), |
264 "w", encoding="utf-8", newline=newline) |
263 "w", encoding="utf-8", newline=newline) as f: |
265 f.write(txt) |
264 f.write(txt) |
266 f.close() |
|
267 |
265 |
268 sys.stdout.write("QtHelp files written.\n") |
266 sys.stdout.write("QtHelp files written.\n") |
269 sys.stdout.write("Generating QtHelp documentation...\n") |
267 sys.stdout.write("Generating QtHelp documentation...\n") |
270 sys.stdout.flush() |
268 sys.stdout.flush() |
271 sys.stderr.flush() |
269 sys.stderr.flush() |