[pywin32-checkins] pywin32/com/win32com/client makepy.py, 1.25.2.1, 1.25.2.2
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Roger U. <ru...@us...> - 2008-08-31 17:22:10
|
Update of /cvsroot/pywin32/pywin32/com/win32com/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9239 Modified Files: Tag: py3k makepy.py Log Message: Incorporate changes to generate to a temp file Index: makepy.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/makepy.py,v retrieving revision 1.25.2.1 retrieving revision 1.25.2.2 diff -C2 -d -r1.25.2.1 -r1.25.2.2 *** makepy.py 29 Aug 2008 08:58:53 -0000 1.25.2.1 --- makepy.py 31 Aug 2008 17:22:20 -0000 1.25.2.2 *************** *** 69,72 **** --- 69,73 ---- import sys, os, types, pythoncom from win32com.client import genpy + from . import selecttlb from . import gencache *************** *** 267,271 **** else: outputName = full_name + ".py" ! fileUse = open(outputName, "wt") progress.LogBeginGenerate(outputName) else: --- 268,279 ---- else: outputName = full_name + ".py" ! # generate to a temp file (so errors don't leave a 1/2 ! # generated file) and one which can handle unicode! ! try: ! os.unlink(outputName) ! except os.error: ! pass ! encoding = 'mbcs' # could make this a param. ! fileUse = open(outputName + ".temp", "wt", encoding=encoding) progress.LogBeginGenerate(outputName) else: *************** *** 278,282 **** if file is None: fileUse.close() ! if bToGenDir: progress.SetDescription("Importing module") --- 286,290 ---- if file is None: fileUse.close() ! os.rename(outputName + ".temp", outputName) if bToGenDir: progress.SetDescription("Importing module") |