[pywin32-checkins] pywin32/com/win32com/client makepy.py, 1.28, 1.29
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Roger U. <ru...@us...> - 2010-01-26 17:14:28
|
Update of /cvsroot/pywin32/pywin32/com/win32com/client In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv27085 Modified Files: makepy.py Log Message: When output filename is specified, open with mbcs encoding (bug #2934871) Index: makepy.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/makepy.py,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** makepy.py 4 Dec 2008 03:18:32 -0000 1.28 --- makepy.py 26 Jan 2010 17:14:19 -0000 1.29 *************** *** 369,373 **** if path is not '' and not os.path.exists(path): os.makedirs(path) ! f = open(outputName, "w") else: f = None --- 369,377 ---- if path is not '' and not os.path.exists(path): os.makedirs(path) ! if sys.version_info > (3,0): ! f = open(outputName, "wt", encoding="mbcs") ! else: ! import codecs # not available in py3k. ! f = codecs.open(outputName, "w", "mbcs") else: f = None |