DiamondLightSource / cothread

Cooperative Python Threads and EPICS Channel Access bindings
Apache License 2.0
13 stars 9 forks source link

PyQt5 support added #6

Closed femanov closed 6 years ago

femanov commented 6 years ago

I rebased to current mastr and added my changes.

According to my checks: 1) it's able to install in python2 and working for my PyQt applications. I just have PyQt4 in python2. 2) it's not working for python3 (I need to use python3 brunch?). Befor rebase I have tested it in python3 brunch with both PyQt4 and PyQt5.

Changes: added qt.py - contains simple import logic changeg input_hook.py - importing from qt.py instead of direct imports

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.8%) to 70.705% when pulling ae3ca77443ce7339cb4bd10e16f04117493aa0ca on femanov:master into fc770d47fe32fec3579dcb4140714dd1a045d75e on dls-controls:master.

Araneidae commented 6 years ago

This does look pretty clean to me. Can you please fix the missing newline at the end of qt.py issue first (trivial, I know, but I do like to keep an eye on layout).

Tell me more about the python3 failures. There isn't a python3 branch anymore, the same codebase should work in both Python2 and Python3. However, my testing with Python3 has been very limited, and I'd like to fix any bugs.

Araneidae commented 6 years ago

Ooops! I see that my latest push broke Python 3. I'll try and fix that

femanov commented 6 years ago

no problem, I have added final new line to qt.py

femanov commented 6 years ago

Python3 issue in catools, i think it's clean what to do:

Traceback (most recent call last): File "./syn.py", line 127, in tree = SynTree('syn') File "./syn.py", line 56, in init catools.camonitor(key + ".dly.set", self.update_value, format=catools.FORMAT_CTRL) File "/usr/local/lib/python3.5/dist-packages/cothread/catools.py", line 556, in camonitor if isinstance(pvs, (str, unicode)): NameError: name 'unicode' is not defined

Araneidae commented 6 years ago

Yes, I've pushed a fix to this! Thanks for patch, think I'm happy to take it.

femanov commented 6 years ago

Thank you, I'll try it now.