Open orlp opened 8 years ago
Getting the clipboard to work with PyQt4 on Ubuntu is going to require starting the event loop (e.g. app.exec_
). I looked into a few courses of action like running processEvents
after each operation, or performing the clipboard operations on another thread using postEvent
(for an example, see https://github.com/autokey/autokey/blob/master/src/lib/scripting.py#L793) but wasn't able to find a satisfactory solution before giving up. Hopefully someone more familiar with PyQt on X11 can offer one but it doesn't look promising.
Hi there,
I encounter a similar issue when trying to run PyQt4 on ubuntu 16.04 native Python3.
Check that out (details printed out with the faulthandler module):
~$ python3
Python 3.5.2 (default, Nov 23 2017, 16:37:01)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import faulthandler
>>> faulthandler.enable()
>>> import PyQt4.QtCore
Fatal Python error: Segmentation fault
Current thread 0x00007fd543ee2700 (most recent call first):
File "<frozen importlib._bootstrap>", line 222 in _call_with_frames_removed
File "<frozen importlib._bootstrap_external>", line 906 in create_module
File "<frozen importlib._bootstrap>", line 577 in module_from_spec
File "<frozen importlib._bootstrap>", line 666 in _load_unlocked
File "<frozen importlib._bootstrap>", line 958 in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 969 in _find_and_load
File "<stdin>", line 1 in <module>
Segmentation fault (core dumped)
This error does not occur when doing the same import on Python2. I need to work with this very version of PyQt4 (4.x, not 5.x) because I need to use the QtCore module.
I am quite new to the tech world so this is very obscure to me, any help would be greatly appreciated :)
Cheers
Any update @chocolateboy ?
The PyQt4 implementation is broken on Ubuntu 14.04, but I don't necessarily think it's pyperclips fault:
Either way, I would really prefer it if
xclip
was prioritized overPyQt4
, and/or being able to blacklist implementations in the preference list.