diff options
author | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-05-22 12:51:28 -0700 |
---|---|---|
committer | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-05-22 12:51:28 -0700 |
commit | 1b4fa5b781d62eb9eaee345171f256e18e3e3acc (patch) | |
tree | f0a74c3b2ee1dcb09781e8d1b60833b8ede6032e /README.md | |
parent | a11cded3eca0ccf1d395b7b9643265b97ef18ef2 (diff) | |
download | pystache-1b4fa5b781d62eb9eaee345171f256e18e3e3acc.tar.gz |
Improve README wording further.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 32 |
1 files changed, 18 insertions, 14 deletions
@@ -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 |