This is an open reference book on the Jython language, an implementation of Python implemented in, and highly interoperable with, Java. It is maintained as a reference to the current version of Jython (perhaps with a touch of lag).
This book is formatted for and available at https://jython.readthedocs.io/en/latest/
This book is licensed under CC-BY-SA http://creativecommons.org/licenses/by-sa/3.0/ . Contributions in the form of pull requests are welcome, and are covered by the same license under the "inbound=outbound" part of the github terms of service https://help.github.com/en/articles/github-terms-of-service#6-contributions-under-repository-license . More detail on the open book license can be found in the book index and preamble (index.rst).
Jython Version | Book version | Book citation |
---|---|---|
Jython 2.5 | 1.0 | Juneau, J., Baker, J., Wierzbicki, F., Muoz, L. S., Ng, V., Ng, A., & Baker, D. L. (2010). The definitive guide to Jython: Python for the Java platform. Apress. |
Building locally requires Python 3.5 or above. Use of a virtual environment is recommended in order to isolate this project’s dependencies (the tools). All you need to begin with is an installed Python.
-
Create a working directory, say
dg-jython
, andcd
into it. There, clone this repository:PS dg-jython> git clone https://github.com/jython/book.git
These instructions assume you cloned into the directory
book
, a sub-directory of your working directory. Do notcd
intobook
: the build runs from the current directory: it will create a sub-directorybuild
to hold the generated files. -
If you do not have
virtualenv
, install it:PS dg-jython> python3 -m pip install virtualenv
(You may need to specify
python3
explicitly as shown, orpy -3
, or it may just bepython
depending on your set-up.) -
Now create a virtual environment, activate it and install the tools.
PS dg-jython> python3 -m virtualenv venv ... PS dg-jython> .\venv\Scripts\activate (venv) PS dg-jython> pip install -r .\book\requirements.txt ...
-
You can now build the book as HTML in
./build
with the command:(venv) PS dg-jython> sphinx-build -N -b html book build\html
(The option
-N
suppresses output formatting that impedes reading on a PoSH console.)
Open build\html\index.html
with your browser to view the generated documentation.
On Linux, the same process looks like this:
$ python3 -m pip install virtualenv
...
$ python3 -m virtualenv venv
Using base prefix '/usr'
...
$ source venv/bin/activate
(venv) $ pip install -r book/requirements.txt
(venv) $ sphinx-build -b html book build/html
...
Open build/html/index.html
with your browser to view the generated documentation.
After edits to the restructured text files, rerun sphinx-build -b html book build/html
to regenerate the documentation.