Closed drmfinlay closed 4 years ago
64-bit trouble?
I noticed in my testing that the accessibility integration doesn't work on 64-bit versions of Python, or at least it doesn't work with Firefox. I'm guessing this is something to do with
comtypes
, theIAccessible2Proxy
DLL or Dragonfly'spyia2
integration.
I think it's because you need a compiled 64-bit Dll? Can be obtained here
Thanks Dane! Hopefully the 64-bit DLL fixes the issue. That is already necessary for Chrome.
@LexiconCode You might be right about that. Unfortunately, I'm unable to test it because I can't get the 64-bit DLL in that project to load.
It is still working in 64-bit Python on some level because these debug messages appear when focusing Firefox's address bar:
comtypes (DEBUG): Release [application | Mozilla Firefox]
comtypes (DEBUG): Release [editable text | Search with Google or enter address]
comtypes (DEBUG): Release <POINTER(IServiceProvider) ptr=0x287ead0 at ed79948>
comtypes (DEBUG): Release [editable text | Search with Google or enter address]
Similar messages appear when other windows are focused.
Anyway, the 64-bit issue could be worked out in another issue/PR. My main concern was making pyia2
work with Python 3 :)
I have gotten
pyia2
working with Python 3, while still keeping it working with Python 2.7. I've added thesix
package as a dependency insetup.py
.CC @wolfmanstout
Testing
I have tested my changes mostly by using Dragonfly's integration with
pyia2
(see this blog post). The IAccessible2-enabled application I tested with was Mozilla Firefox.pyia2
's test scripts also work correctly using either major Python version.PumpEvents()
errorsOne other thing I've done is suppressed Windows error messages raised from the
PumpEvents
comtypes function. For example:These errors are only present on Python 3.x and seem to have no impact on
pyia2
's functionality. I've logged them as debug messages because they're pretty spammy.64-bit trouble?
I noticed in my testing that the accessibility integration doesn't work on 64-bit versions of Python, or at least it doesn't work with Firefox. I'm guessing this is something to do with
comtypes
, theIAccessible2Proxy
DLL or Dragonfly'spyia2
integration.