[pywin32-bugs] [ pywin32-Bugs-3199843 ] No module named new (216 - py3.1)
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2011-04-24 04:23:53
|
Bugs item #3199843, was opened at 2011-03-05 05:29 Message generated for change (Comment added) made by mhammond You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3199843&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: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: pachalmars (pachalmars) Assigned to: Nobody/Anonymous (nobody) Summary: No module named new (216 - py3.1) Initial Comment: Using pywin32-216.win32-py3.1, i get the error : File "C:\Python31\lib\site-packages\win32com\client\__init__.py", line 320, in WithEvents import new ImportError: No module named new Can be corrected by replacing lines 320-324 : import new events_class = getevents(clsid) if events_class is None: raise ValueError("This COM object does not support events.") result_class = new.classobj("COMEventClass", (events_class, user_event_class), {}) with : try: from types import ClassType as new_type except ImportError: new_type = type # py3k events_class = getevents(clsid) if events_class is None: raise ValueError("This COM object does not support events.") result_class = new_type("COMEventClass", (events_class, user_event_class), {}) ---------------------------------------------------------------------- >Comment By: Mark Hammond (mhammond) Date: 2011-04-24 14:23 Message: Thanks! Fixed in rev 7f44ae5e7785 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3199843&group_id=78018 |