python-libxdo?

Pavol Lisy pavol.lisy at gmail.com
Tue Feb 28 05:05:28 EST 2017


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?



More information about the Python-list mailing list