summaryrefslogtreecommitdiff
path: root/cmd2.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2018-01-04 13:48:08 -0500
committerTodd Leonhardt <todd.leonhardt@gmail.com>2018-01-04 13:48:08 -0500
commitf82ed4e03627f3149da0675432f218c5ead468e2 (patch)
tree2ebdb0db05ed3e90bface0236e14bc1455de7b5f /cmd2.py
parent63b0c6b3a92cab837a71bbad78e777c522823c93 (diff)
downloadcmd2-git-f82ed4e03627f3149da0675432f218c5ead468e2.tar.gz
Updating version and changelog in preparation for minor bug fix realease
Diffstat (limited to 'cmd2.py')
-rwxr-xr-xcmd2.py23
1 files changed, 12 insertions, 11 deletions
diff --git a/cmd2.py b/cmd2.py
index c7c54e26..54072d99 100755
--- a/cmd2.py
+++ b/cmd2.py
@@ -53,16 +53,6 @@ except ImportError:
# noinspection PyUnresolvedReferences
from pyperclip import PyperclipException
-# 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:
- pass
-
# next(it) gets next item of iterator it. This is a replacement for calling it.next() in Python 2 and next(it) in Py3
from six import next
@@ -105,7 +95,18 @@ if six.PY3:
else:
BROKEN_PIPE_ERROR = IOError
-__version__ = '0.7.9a'
+# 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.
+if six.PY2 and sys.platform.startswith('lin'):
+ try:
+ # noinspection PyUnresolvedReferences
+ import gtk
+ gtk.set_interactive(0)
+ except ImportError:
+ pass
+
+__version__ = '0.7.9'
# Pyparsing enablePackrat() can greatly speed up parsing, but problems have been seen in Python 3 in the past
pyparsing.ParserElement.enablePackrat()