Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Utility to debug Zope Page Templates

Project Description


Script that runs the pagetemplate parser and output errors


Because zptlint depends on zope.pagetemplate, it depends on a lot of other zope eggs.

To avoid polluting you system python, you can install zptlint in a virtualenv:

$ virtualenv --no-site-packages zptlint
$ cd zptlint/
$ bin/easy_install zptlint

Then make a link to the right script:

$ ln -s MYPATH/zptlint/bin/zptlint

Configuration in .vimrc

"page templates configuration
autocmd BufNewFile,BufRead *.pt,*.cpt,*.zpt setfiletype zpt
autocmd FileType zpt set makeprg=zptlint\ %
autocmd FileType zpt set errorformat=%+P***\ Error\ in:\ %f,%Z%*\\s\\,\ at\ line\ %l\\,\ column\ %c,%E%*\\s%m,%-Q

augroup filetype
  au BufWritePost,FileWritePost *.pt make
  au BufWritePost,FileWritePost *.cpt make
  au BufWritePost,FileWritePost *.zpt make
augroup END

Because zpt is defined as a new file type, you may want to copy syntax/html.vim to syntax/zpt.vim and ftplugin/html.vim to ftplugin/zpt.vim.

or usage from command-line in vim:

set makeprg=zptlint\ %
set errorformat=%+P***\ Error\ in:\ %f,%Z%*\\s\\,\ at\ line\ %l\\,\ column\ %c,%E%*\\s%m,%-Q


  • code by Balazs Ree, Greenfinity
  • eggified by Godefroid Chapelle, BubbleNet

Changelog for zptlint

0.2.4 (2010-12-26)

  • Fix url in [gotcha]

0.2.3 (2009-12-18)

  • Documentation fixes (suggested by Davide Moro) [gotcha]

0.2.2 (2009-12-18)

  • Testing multiple files was broken (reported by Wouter Vanden Hove) [gotcha]

0.2.1 (2009-12-18)

  • Remove RestrictedPython from dependencies [gotcha]

0.2 (2009-12-18)

  • Add provider expression support [gotcha]

0.1 (2009-12-17)

  • Proper source release [gotcha]

0.1a (2008-06-16)

  • First release to PyPI [gotcha]
  • Initial code [ree]

Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download Files

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

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(4.5 kB) Copy SHA256 Hash SHA256
Source None Dec 26, 2010

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers