[pywin32-bugs] [ pywin32-Bugs-3102779 ] makepy created files fail on Python 3.1
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2010-11-04 09:32:53
|
Bugs item #3102779, was opened at 2010-11-04 09:32 Message generated for change (Tracker Item Submitted) made by You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3102779&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: com Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Docent () Assigned to: Nobody/Anonymous (nobody) Summary: makepy created files fail on Python 3.1 Initial Comment: Python 3.1, PyWin32-214, Windows XP Pro Sp3 32-bit, Excel 2007 The makepy generated files are not compatible with Python 3. How to reproduce (For Excel 2007) import win32com.client import os, sys try: win32com.client.gencache.EnsureModule('{00020813-0000-0000-C000-000000000046}', 0, 1, 6) xl = win32com.client.Dispatch("Excel.Application") xl.Visible = 1 xl.DisplayAlerts = False wb = xl.Workbooks.Add() sh = wb.Sheets(1) print(str(sh.Cells(1,1))) finally: xl.Quit() ----------------- Result: Traceback (most recent call last): File "test.py", line 13, in <module> print(str(sh.Cells(1,1))) File "C:\prog\Python31\lib\site-packages\win32com\gen_py\00020813-0000-0000-C0 00-000000000046x0x1x6.py", line 27028, in __str__ return str(self.__unicode__(*args)) File "C:\prog\Python31\lib\site-packages\win32com\gen_py\00020813-0000-0000-C0 00-000000000046x0x1x6.py", line 27024, in __unicode__ return unicode(self.__call__(*args)) NameError: global name 'unicode' is not defined ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3102779&group_id=78018 |