We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3a58cab + 2d4e698 commit e67e4bdCopy full SHA for e67e4bd
1 file changed
cmd2.py
@@ -46,6 +46,16 @@
46
import pyparsing
47
import pyperclip
48
49
+# On some systems, pyperclip will import gtk for its clipboard functionality.
50
+# 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:
57
+ pass
58
+
59
# next(it) gets next item of iterator it. This is a replacement for calling it.next() in Python 2 and next(it) in Py3
60
from six import next
61
0 commit comments