Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pystache_custom
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
pystache_custom
Commits
1b4fa5b7
Commit
1b4fa5b7
authored
May 22, 2012
by
Chris Jerdonek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve README wording further.
parent
a11cded3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
14 deletions
+18
-14
README.md
+18
-14
No files found.
README.md
View file @
1b4fa5b7
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment