Requirements¶
Python version 2.4 or newer.[1]
If it is missing on your machine, you can get it from http://www.python.org/download/
| [1] | Version 2.3 should work as long as you do not use the
--doctest option. |
Download¶
PyLit¶
- pylit.py
- There are no file releases. You get the most up to date version from the SVN repository.
- pylit
- A simple starter and configuration wrapper (see installation).
- pylit_test.py
- unit tests for the pylit module
Tools¶
- Docutils or Sphinx for conversion of reStructuredText to HTML or PDF (not strictly required by PyLit but needed for “pretty printing” the text source)
- Editor Support for reStructuredText
- pylit functions for the JED editor
Installation¶
As PyLit is a pure Python module, installation is straightforward:
Put pylit.py in Python’s Module Search Path.
You can now call the script with
python -m pylit OPTIONS INFILE [OUTFILE]
or
python -m pylit --help
Easier invocation is possible with a small executable wrapper in the binary PATH. On Unix you can use a script like pylit:
#!/usr/bin/env python # Load the pylit module:: import pylit # Configure default settings, e.g. :: ## pylit.defaults.code_block_marker['c++'] = '.. code-block:: c++' # call the text <--> code converter:: pylit.main()
This has two advantages:
- Command line use is simplified.
- Default settings can be customised without changing the module file.