Skip to main content

Generate color syntax highlighted PNG image from python source files.

Project description

pyliter is a Python 3 command-line tool that generates PNG files from python source.


  • syntax highlighting
  • PNG files
  • preview mode
  • OpenGL rendering using pyglet


$ pip install pyliter
$ pip install git+


$ pyliter --help
Usage: pyliter [OPTIONS] [INPUT_FILE]

  Python syntax highlighting

  Renders syntax-highlighted text to PNG file and optional previews the
  render in a window before saving.

  If the optional output path is omitted, preview is enabled.

  -o, --output-file PATH    Creates a PNG with the supplied path.
  -l, --start-line INTEGER  Line number to begin display.  [default: 0]
  -n, --line-count INTEGER  Number of lines to display.  [default: 10]
  -N, --no-line-numbers     Disable line numbers in output.  [default: False]
  -p, --preview             Previews output in window.  [default: False]
  -t, --transparent         Write output PNG with transparency.  [default:
  -s, --style-name TEXT     Style to apply to input file.  [default: default]
  -f, --font-name TEXT      Font name.  [default: courier]
  -S, --font-size INTEGER   Font size  [default: 24]
  -L, --list-styles         List available styles and exits.
  --version                 Show the version and exit.
  --help                    Show this message and exit.


Super Awesome PNG Screenshot

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyliter-1.5.0.tar.gz (21.7 kB view hashes)

Uploaded source

Built Distribution

pyliter-1.5.0-py3-none-any.whl (35.1 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page