Commit 1b4fa5b7 by Chris Jerdonek

Improve README wording further.

parent a11cded3
......@@ -41,9 +41,10 @@ Pystache is tested with--
- Python 3.2
[Distribute](http://packages.python.org/distribute/) (the setuptools fork)
is recommended over setuptools, and is required in some cases (e.g. for
Python 3 support). If you use [pip](http://www.pip-installer.org/),
you probably already satisfy this requirement.
is recommended over [setuptools](http://pypi.python.org/pypi/setuptools),
and is required in some cases (e.g. for Python 3 support).
If you use [pip](http://www.pip-installer.org/), you probably already satisfy
this requirement.
JSON support is needed only for the command-line interface and to run
the spec tests. We require simplejson for earlier versions of Python
......@@ -61,6 +62,9 @@ Install It
----------
pip install pystache
And test it--
pystache-test
To install and test from source (e.g. from GitHub), see the Develop
......@@ -127,8 +131,8 @@ Pystache has supported Python 3 since version 0.5.1. Pystache behaves
slightly differently between Python 2 and 3, as follows:
- In Python 2, the default html-escape function `cgi.escape()` does
not escape single quotes; whereas in Python 3, the default escape
function `html.escape()` does escape single quotes.
not escape single quotes. In Python 3, the default escape function
`html.escape()` does escape single quotes.
- In both Python 2 and 3, the string and file encodings default to
`sys.getdefaultencoding()`. However, this function can return
different values under Python 2 and 3, even when run from the same
......@@ -210,10 +214,10 @@ To run a subset of the tests, you can use
### Using Python 3 with Pystache from source
Pystache is written in Python 2 and must be converted to Python 3 prior to
running under Python 3. The installation process (and tox) do this
using it with Python 3. The installation process (and tox) do this
automatically.
To convert the source code to Python 3 (while using Python 3)--
To convert the code to Python 3 manually (while using Python 3)--
python setup.py build
......@@ -221,10 +225,10 @@ And while using Python 2--
python setup.py --force2to3 build
These commands write the converted code to a subdirectory called `build`.
Both of the above write the converted code to a subdirectory called `build`.
To do this manually (without using setup.py), you can use
[2to3](http://docs.python.org/library/2to3.html) in two steps--
To convert the code without using setup.py, you can use
[2to3](http://docs.python.org/library/2to3.html) as follows (two steps)--
2to3 --write --nobackups --no-diffs --doctests_only pystache
2to3 --write --nobackups --no-diffs pystache
......@@ -233,10 +237,10 @@ This converts the code in-place.
To `import pystache` from a source distribution while using Python 3, be
sure that you are importing from a directory containing a converted
version (e.g. from the `build` directory after converting), and not from
the unconverted source directory. Otherwise, you will get a syntax error.
You can help ensure this by not running the Python IDE from the project
directory when importing Pystache.
version of the code (e.g. from the `build` directory after converting),
and not from the original (unconverted) source directory. Otherwise, you will
get a syntax error. You can help prevent this by not running the Python
IDE from the project directory when importing Pystache while using Python 3.
Mailing List
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment