[pywin32-checkins] pywin32/Pythonwin/pywin/mfc activex.py,1.4,1.5
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2009-01-05 11:03:52
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/mfc In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv30356/Pythonwin/pywin/mfc Modified Files: activex.py Log Message: py3k-friendly dynamic class creation Index: activex.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/mfc/activex.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** activex.py 14 Nov 2008 00:22:25 -0000 1.4 --- activex.py 5 Jan 2009 11:03:45 -0000 1.5 *************** *** 1,6 **** """Support for ActiveX control hosting in Pythonwin. """ ! import win32ui, win32uiole, window ! import new class Control(window.Wnd): --- 1,12 ---- """Support for ActiveX control hosting in Pythonwin. """ ! import win32ui, win32uiole ! import window ! # XXX - we are still "classic style" classes in py2x, so we need can't yet ! # use 'type()' everywhere - revisit soon, as py2x will move to new-style too... ! try: ! from types import ClassType as new_type ! except ImportError: ! new_type = type # py3k class Control(window.Wnd): *************** *** 62,66 **** if name is None: name = controlClass.__name__ ! return new.classobj("OCX" + name, (Control, controlClass), {}) def MakeControlInstance( controlClass, name = None ): --- 68,72 ---- if name is None: name = controlClass.__name__ ! return new_type("OCX" + name, (Control, controlClass), {}) def MakeControlInstance( controlClass, name = None ): |