I've installed comtypes 0.6.2 on Python 3.3.2 on Windows, but on importing comtypes, I get this error:
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "c:\python\lib\site-packages\comtypes-0.6.2-py3.3-win-amd64.egg\comtypes\__init__.py", line 1049, in <module> class IUnknown(object, metaclass=_cominterface_meta): File "c:\python\lib\site-packages\comtypes-0.6.2-py3.3-win-amd64.egg\comtypes\__init__.py", line 281, in __new__ class _(partial.partial, POINTER(p)): TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases
Here's a temporary patch: https://gist.github.com/codito/6207739. I have tried with comtypes svn snapshot (from trunk, after a 2to3.py conversion).
@Arun: Do you have a copy of the temporary patch? The referenced gist is no longer available.
This issue is blocking the 'jaraco.video' project (https://bitbucket.org/jaraco/jaraco.video).
Attached is the patch.
This is the accessible url of the patch (the previous link had a "." at the end :(): https://gist.github.com/codito/6207739
Thanks Arun. Silly that I missed the extraneous period in the link.
Based on that patch, I've applied this patch to the source:
https://bitbucket.org/jaraco/comtypes/commits/b85ebb181c17cc110bf486100c038434ff68ee8c
That commit should work under Python 2 and converts to Python 3 to accomplish the aforementioned patch (with a couple of other locations where the metaclass had to be constructed.
I think the proper fix for this is simply to not use metaclasses for the 'partial' and instead just monkey-patch the classes in place. In any case, the jaraco.video project is no longer blocked based on this workaround.
Fixed and released in 1.0.0.