happyleavesaoc / python-orvibo

MIT License
36 stars 20 forks source link

Python 2 support? #10

Open guysoft opened 7 years ago

guysoft commented 7 years ago

Hey, So I know its in the docs, but was wondering if there is a way to get Python 2 support? What needs to be done to support python2?

plutec commented 7 years ago

https://github.com/happyleavesaoc/python-orvibo/blob/master/orvibo/s20.py#L57 Replace by: udp = threading.Thread(target=_listen) (daemon param is not allowed in Py2)

https://github.com/happyleavesaoc/python-orvibo/blob/master/orvibo/s20.py#L273 Replace by: def _udp_transact(self, payload, handler, broadcast=False, timeout=TIMEOUT, *args): Py2 only accepts possitional arguments at the end.