diff options
author | Eric Lin <anselor@gmail.com> | 2018-04-18 00:18:39 -0400 |
---|---|---|
committer | Eric Lin <anselor@gmail.com> | 2018-04-18 00:18:39 -0400 |
commit | 736cdda5f80682fadfc1556dae92046d2e9c770c (patch) | |
tree | f41995c9e6d31a42ccef01ebac3fff4662f396d0 | |
parent | 8a5e2ffa464693bd915937721d2b7c17152110e9 (diff) | |
download | cmd2-git-736cdda5f80682fadfc1556dae92046d2e9c770c.tar.gz |
Adding back Pyperclip imports that got mixed up in merge
-rwxr-xr-x | cmd2/cmd2.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index afe9bc84..87db423a 100755 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -70,6 +70,13 @@ elif rl_type == RlType.GNU: rl_basic_quote_characters = ctypes.c_char_p.in_dll(readline_lib, "rl_basic_quote_characters") orig_rl_basic_quote_characters_addr = ctypes.cast(rl_basic_quote_characters, ctypes.c_void_p).value +# Newer versions of pyperclip are released as a single file, but older versions had a more complicated structure +try: + from pyperclip.exceptions import PyperclipException +except ImportError: + # noinspection PyUnresolvedReferences + from pyperclip import PyperclipException + # Collection is a container that is sizable and iterable # It was introduced in Python 3.6. We will try to import it, otherwise use our implementation try: |