Requirements

Download

PyLit

pylit.py
There are no file releases yet. You get the most up to date version from the GitHub repository.
pylit
A simple starter and configuration wrapper (see installation).
pylit_test.py
unit tests for the pylit module

Tools

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

    python3 -m pylit OPTIONS INFILE [OUTFILE]
    

    or

    python3 -m pylit --help
    
  • Easier invocation is possible with a small executable wrapper in the PATH. On Unix you can use a script like pylit:

    #!/usr/bin/env python3
    
    # 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:

    1. Command line use is simplified.
    2. Default settings can be customised without changing the module file.