We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7ef6a8d commit 2d4e698Copy full SHA for 2d4e698
1 file changed
cmd2.py
@@ -46,9 +46,11 @@
46
import pyparsing
47
import pyperclip
48
49
-# Workaround for gtk interfering when printing from background thread while main
50
-# thread is blocking in raw_input() in Python 2 on Linux when gtk is installed
+# On some systems, pyperclip will import gtk for its clipboard functionality.
+# The following code is a workaround for gtk interfering with printing from a background
51
+# thread while the CLI thread is blocking in raw_input() in Python 2 on Linux.
52
try:
53
+ # noinspection PyUnresolvedReferences
54
import gtk
55
gtk.set_interactive(0)
56
except ImportError:
0 commit comments