|
18 | 18 | On Linux, install xclip or xsel via package manager. For example, in Debian:
|
19 | 19 | sudo apt-get install xclip
|
20 | 20 |
|
21 |
| -Otherwise on Linux, you will need the gtk, qtpy or PyQt modules installed. |
| 21 | +Otherwise on Linux, you will need the qtpy or PyQt modules installed. |
22 | 22 | qtpy also requires a python-qt-bindings module: PyQt4, PyQt5, PySide, PySide2
|
23 | 23 |
|
24 |
| -gtk and PyQt4 modules are not available for Python 3, |
25 |
| -and this module does not work with PyGObject yet. |
| 24 | +This module does not work with PyGObject yet. |
26 | 25 | """
|
27 | 26 | __version__ = '1.5.27'
|
28 | 27 |
|
29 | 28 | import platform
|
30 | 29 | import os
|
31 | 30 | import subprocess
|
32 |
| -from .clipboards import (init_osx_clipboard, |
33 |
| - init_gtk_clipboard, init_qt_clipboard, |
34 |
| - init_xclip_clipboard, init_xsel_clipboard, |
35 |
| - init_klipper_clipboard, init_no_clipboard) |
| 31 | +from .clipboards import ( |
| 32 | + init_osx_clipboard, init_qt_clipboard, init_xclip_clipboard, |
| 33 | + init_xsel_clipboard, init_klipper_clipboard, init_no_clipboard) |
36 | 34 | from .windows import init_windows_clipboard
|
37 | 35 |
|
38 | 36 | # `import qtpy` sys.exit()s if DISPLAY is not in the environment.
|
@@ -60,14 +58,6 @@ def determine_clipboard():
|
60 | 58 | return init_osx_clipboard()
|
61 | 59 | if HAS_DISPLAY:
|
62 | 60 | # Determine which command/module is installed, if any.
|
63 |
| - try: |
64 |
| - # Check if gtk is installed |
65 |
| - import gtk # noqa |
66 |
| - except ImportError: |
67 |
| - pass |
68 |
| - else: |
69 |
| - return init_gtk_clipboard() |
70 |
| - |
71 | 61 | try:
|
72 | 62 | # qtpy is a small abstraction layer that lets you write
|
73 | 63 | # applications using a single api call to either PyQt or PySide
|
@@ -104,7 +94,6 @@ def set_clipboard(clipboard):
|
104 | 94 | global copy, paste
|
105 | 95 |
|
106 | 96 | clipboard_types = {'osx': init_osx_clipboard,
|
107 |
| - 'gtk': init_gtk_clipboard, |
108 | 97 | 'qt': init_qt_clipboard,
|
109 | 98 | 'xclip': init_xclip_clipboard,
|
110 | 99 | 'xsel': init_xsel_clipboard,
|
|
0 commit comments