diff options
-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: |