EmPy is a system for embedding Python expressions and statements in template text. It takes an EmPy source file, processes it, and produces output. This is accomplished via expansions, which are special signals to the EmPy system and are set off by a special prefix (by default the at sign, '@'). It can expand arbitrary Python expressions and statements in this way, as well as a variety of special forms. Textual data not explicitly delimited in this way is sent unaffected to the output, allowing Python to be used in effect as a markup language. Also supported are callbacks via hooks, recording and playback via diversions, and dynamic, chainable filters. The system is highly configurable via command line options and embedded commands.
|Tags||Text Processing Software Development Interpreters Internet Web Dynamic Content Markup Filters Pre-processors Libraries Python Modules|
|Operating Systems||OS Independent|
Release Notes: The separate pseudo-module instance was removed for greater transparency, and its 'interpreter' attribute was deprecated. The auxiliary class name attributes associated with the pseudo-module were also deprecated in preparation for a separate support library. --no-callback-error and --no-bangpath-processing command line options were added along with an 'atToken' hook.
Release Notes: This version reengineers the hooks support to use hook instances, adds a -v/--verbose option, adds a --relative- path option, reverses the PEP 317 style, and modifies Unicode support to give less confusing errors in the case of unknown encodings and error handlers.
Release Notes: This version adds literal '@"..."' markup, a --pause-at- end command line option, and fixes an improper globals collision error via the 'sys.stdout' proxy.
Release Notes: Unicode support was added, which requires Python 2.0 or above. Document and Processor helper classes were added for processing significators. The --no-prefix option was added for suppressing all markups.
Release Notes: This version features somewhat more robust lvalue parsing for '@[for]' construct.