diff options
| author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-03-21 17:24:30 -0400 |
|---|---|---|
| committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-03-21 17:24:30 -0400 |
| commit | baccdf51b450ca3e185a2a5e8890c0af81bfebbb (patch) | |
| tree | 359409261c5e257faa3804b613c00e3a44f30811 /cmd2.py | |
| parent | 2ad05870d1b1b7f30c24e8fbc4383d836b7010b3 (diff) | |
| parent | 4cea62a8fb7f5da3cfd4ee32fde831f401c128dc (diff) | |
| download | cmd2-git-baccdf51b450ca3e185a2a5e8890c0af81bfebbb.tar.gz | |
Merge branch 'master' into new_quoted_completion
Diffstat (limited to 'cmd2.py')
| -rwxr-xr-x | cmd2.py | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -113,13 +113,17 @@ try: except ImportError: ipython_available = False -# Try to import readline, but allow failure for convenience in Windows unit testing -# Note: If this actually fails, you should install readline on Linux or Mac or pyreadline on Windows +# Prefer statically linked gnureadline if available (for macOS compatibility due to issues with libedit) try: - # noinspection PyUnresolvedReferences - import readline + import gnureadline as readline except ImportError: - pass + # Try to import readline, but allow failure for convenience in Windows unit testing + # Note: If this actually fails, you should install readline on Linux or Mac or pyreadline on Windows + try: + # noinspection PyUnresolvedReferences + import readline + except ImportError: + pass # Load the GNU readline lib so we can make changes to it readline_lib = None |
