You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added back in preference for gnureadline if it is present
Now that the crash bug in the gnureadline Python module which statically links against a compatible version of GNU Readline has been fixed for macOS, we added back in the top-level import boilerplate to prefer it if it is available.
Also updated some documentation in relation to getting readline installed for macOS.
Copy file name to clipboardExpand all lines: docs/install.rst
+29-2Lines changed: 29 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,4 @@
1
1
2
-
=========================
3
2
Installation Instructions
4
3
=========================
5
4
@@ -138,5 +137,33 @@ Extra requirement for Python 2.7 only
138
137
If you want to be able to pipe the output of commands to a shell command on Python 2.7, then you will need one
139
138
additional package installed:
140
139
141
-
* subprocess32
140
+
* subprocess32gNU
141
+
142
+
Extra requirement for macOS
143
+
===========================
144
+
macOS comes with the `libedit <http://thrysoee.dk/editline/>`_ library which is similar, but not identical, to GNU Readline.
145
+
Tab-completion for ``cmd2`` applications is only tested against GNU Readline.
146
+
147
+
There are several ways GNU Readline can be installed within a Python environment on a Mac, detailed in the following subsections.
148
+
149
+
gnureadline Python module
150
+
-------------------------
151
+
Install the `gnureadline <https://pypi.python.org/pypi/gnureadline>`_ Python module which is statically linked against a specific compatible version of GNU Readline::
152
+
153
+
pip install -U gnureadline
154
+
155
+
readline via conda
156
+
------------------
157
+
Install the **readline** package using the ``conda`` package manager included with the Anaconda Python distribution::
158
+
159
+
conda install readline
160
+
161
+
readline via brew
162
+
-----------------
163
+
Install the **readline** package using the Homebrew package manager (compiles from source)::
164
+
165
+
brew install openssl
166
+
brew install pyenv
167
+
brew install readline
142
168
169
+
Then use pyenv to compile Python and link against the installed readline
0 commit comments