diff options
Diffstat (limited to 'cmd2.py')
-rwxr-xr-x | cmd2.py | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -46,9 +46,11 @@ from optparse import make_option import pyparsing import pyperclip -# Workaround for gtk interfering when printing from background thread while main -# 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 +# thread while the CLI thread is blocking in raw_input() in Python 2 on Linux. try: + # noinspection PyUnresolvedReferences import gtk gtk.set_interactive(0) except ImportError: |