diff options
| author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-01-04 14:39:58 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-01-04 14:39:58 -0500 |
| commit | 5f976639ee947a83dadf888e1307401980d01434 (patch) | |
| tree | d54727ea2ee18d256f5559cfaa991abb8158a243 /cmd2.py | |
| parent | 63b0c6b3a92cab837a71bbad78e777c522823c93 (diff) | |
| parent | c447ee4b1bff681396a4c6bff54decd6ce852e55 (diff) | |
| download | cmd2-git-0.7.9.tar.gz | |
Merge pull request #243 from python-cmd2/release_prep0.7.9
Abandoned official support for Python 3.3
Diffstat (limited to 'cmd2.py')
| -rwxr-xr-x | cmd2.py | 23 |
1 files changed, 12 insertions, 11 deletions
@@ -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() |
