diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-04-16 20:40:13 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-16 20:40:13 -0700 |
commit | 33f2f03610f6c71ed232fe3b608f8592dec88428 (patch) | |
tree | 16f9f5c56427965de247dfca92e7481cf3fd4843 /docs | |
parent | 8aaf6f431ef5e0f5e4e55759a08a22a4591d8f6b (diff) | |
parent | 11a9664f3bb9bba7b97b6400d787ee05842739cd (diff) | |
download | cmd2-git-33f2f03610f6c71ed232fe3b608f8592dec88428.tar.gz |
Merge pull request #354 from python-cmd2/python3
Move to Python 3.4+ only
Diffstat (limited to 'docs')
-rw-r--r-- | docs/freefeatures.rst | 5 | ||||
-rw-r--r-- | docs/index.rst | 2 | ||||
-rw-r--r-- | docs/install.rst | 22 | ||||
-rw-r--r-- | docs/requirements.txt | 2 |
4 files changed, 7 insertions, 24 deletions
diff --git a/docs/freefeatures.rst b/docs/freefeatures.rst index ec43b043..a7a112fc 100644 --- a/docs/freefeatures.rst +++ b/docs/freefeatures.rst @@ -344,8 +344,3 @@ which inherits from ``cmd2.Cmd``:: # Make sure you have an "import functools" somewhere at the top complete_bar = functools.partialmethod(cmd2.Cmd.path_complete, dir_only=True) - - # Since Python 2 does not have functools.partialmethod(), you can achieve the - # same thing by implementing a tab completion function - def complete_bar(self, text, line, begidx, endidx): - return self.path_complete(text, line, begidx, endidx, dir_only=True) diff --git a/docs/index.rst b/docs/index.rst index 70b1b69a..d3b2adfe 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -73,7 +73,7 @@ Contents: Compatibility ============= -Tested and working with Python 2.7 and 3.4+. +Tested and working with Python 3.4+ on Windows, macOS, and Linux. Indices and tables ================== diff --git a/docs/install.rst b/docs/install.rst index b6ee0aff..be7c61dd 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -6,7 +6,7 @@ This section covers the basics of how to install, upgrade, and uninstall ``cmd2` Installing ---------- -First you need to make sure you have Python 2.7 or Python 3.4+, pip_, and setuptools_. Then you can just use pip to +First you need to make sure you have Python 3.4+, pip_, and setuptools_. Then you can just use pip to install from PyPI_. .. _pip: https://pypi.python.org/pypi/pip @@ -25,7 +25,7 @@ install from PyPI_. Requirements for Installing ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -* If you have Python 2 >=2.7.9 or Python 3 >=3.4 installed from `python.org +* If you have Python 3 >=3.4 installed from `python.org <https://www.python.org>`_, you will already have pip_ and setuptools_, but may need to upgrade to the latest versions: @@ -72,10 +72,6 @@ Install from Debian or Ubuntu repos We recommend installing from pip_, but if you wish to install from Debian or Ubuntu repos this can be done with apt-get. -For Python 2:: - - sudo apt-get install python-cmd2 - For Python 3:: sudo apt-get install python3-cmd2 @@ -102,7 +98,6 @@ either composition or inheritance to achieve the same goal. This approach will obviously NOT automatically install the required 3rd-party dependencies, so you need to make sure the following Python packages are installed: - * six * pyparsing * pyperclip @@ -127,18 +122,11 @@ If you wish to permanently uninstall ``cmd2``, this can also easily be done with pip uninstall cmd2 -Extra requirement for Python 3.4 and earlier --------------------------------------------- -``cmd2`` requires the ``contextlib2`` module for Python 3.4 and earlier. This is used to temporarily redirect +Extra requirement for Python 3.4 +-------------------------------- +``cmd2`` requires the ``contextlib2`` module for Python 3.4. This is used to temporarily redirect stdout and stderr. -Extra requirement for Python 2.7 only -------------------------------------- -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 -additional package installed: - - * subprocess32gNU - Extra requirement for macOS =========================== macOS comes with the `libedit <http://thrysoee.dk/editline/>`_ library which is similar, but not identical, to GNU Readline. diff --git a/docs/requirements.txt b/docs/requirements.txt index b8cf9271..4f05675a 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,6 +1,6 @@ pyparsing -six pyperclip contextlib2 enum34 subprocess32 +wcwidth |