python-libxdo?
Jim
jf_byrnes at comcast.net
Tue Feb 28 22:12:38 EST 2017
On 02/28/2017 04:05 AM, Pavol Lisy wrote:
> On 2/28/17, Jim <jf_byrnes at comcast.net> wrote:
>
> simplified:
>
>> from xdo import Xdo
>> xdo = Xdo()
>> win = xdo.search_windows(winname = 'Mozilla Firefox')
>> File "/home/jfb/EVs/env/lib/python3.5/site-packages/xdo/__init__.py"
>> TypeError: bytes or integer address expected instead of str instance
>
> Example on github seems to use python2 where bytes and str are same type.
>
> Because you have python3, you need to write ->
>
> win = xdo.search_windows(winname = b'Mozilla Firefox')
>
> PS. this reminds me "Talk Python to Me with GvR" thread on this list. :)
>
> How to minimize frustration? Could not have ctypes.Structure something
> like encoding attribute?
>
Thanks Pavol,
I made the change you suggested and the error is gone.
Regards, Jim
More information about the Python-list
mailing list