eric5-api.py

changeset 45
9a18f4dbb493
parent 40
c2e5472b112c
child 107
918a6be6f051
equal deleted inserted replaced
44:fe5cd20cb0eb 45:9a18f4dbb493
254 254
255 outdir = os.path.dirname(outputFile) 255 outdir = os.path.dirname(outputFile)
256 if outdir and not os.path.exists(outdir): 256 if outdir and not os.path.exists(outdir):
257 os.makedirs(outdir) 257 os.makedirs(outdir)
258 try: 258 try:
259 out = open(outputFile, "w") 259 out = open(outputFile, "w", encoding = "utf-8")
260 out.write(os.linesep.join(sorted(apis))) 260 out.write(os.linesep.join(sorted(apis)))
261 out.close() 261 out.close()
262 except IOError as v: 262 except IOError as v:
263 sys.stderr.write("%s error: %s\n" % (outputFile, v[1])) 263 sys.stderr.write("%s error: %s\n" % (outputFile, v[1]))
264 sys.exit(3) 264 sys.exit(3)

eric ide

mercurial