ANN: EmPy 3.0.3 -- A powerful and robust templating system for Python

Discussion in 'Python' started by Erik Max Francis, Jul 9, 2003.

  1. Overview

    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, '@'). EmPy 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.

    Expressions are embedded in text with the '@(...)' notation;
    variations include conditional expressions with '@(...?...!...)'
    and the ability to handle thrown exceptions with '@(...$...)'. As
    a shortcut, simple variables and expressions can be abbreviated as
    '@variable', '@object.attribute', '@function(arguments)',
    '@sequence[index]', and combinations. Full-fledged statements
    are embedded with '@{...}'. Control flow in terms of conditional
    or repeated expansion is available with '@[...]'. A '@' followed
    by a whitespace character (including a newline) expands to
    nothing, allowing string concatenations and line continuations.
    Comments are indicated with '@#' and consume the rest of the line,
    up to and including the trailing newline. '@%' indicate
    "significators," which are special forms of variable assignment
    intended to specify per-file identification information in a
    format which is easy to parse externally. Context name and line
    number changes can be done with '@?' and '@!' respectively.
    Escape sequences analogous to those in C can be specified with
    '@\...', and finally a '@@' sequence expands to a single literal
    at sign.


    Getting the software

    The current version of empy is 3.0.3.

    The latest version of the software is available in a tarball here:
    http://www.alcyone.com/pyos/empy/empy-latest.tar.gz.

    The official URL for this Web site is
    http://www.alcyone.com/pyos/empy/.


    Requirements

    EmPy should work with any version of Python from 1.5.2 onward. It
    has been tested with all major versions of CPython from 1.5 up,
    and Jython from 2.0 up (using Java runtimes 1.3.0 and 1.4.1). The
    included test script is intended to run on Unix-like systems with
    a Bourne shell.


    License

    This code is released under the GPL.

    ....

    Release history [since 3.0]

    - 3.0.3; 2003 Jul 9. Fix bug regarding recursive tuple unpacking
    using '@[for]'; add 'empy.saveGlobals', 'empy.restoreGlobals',
    and 'empy.defined' functions.

    - 3.0.2; 2003 Jun 19. '@?' and '@!' markups for changing the
    current context name and line, respectively; add 'update' method
    to interpreter; new and renamed context operations,
    'empy.setContextName', 'empy.setContextLine',
    'empy.pushContext', 'empy.popContext'.

    - 3.0.1; 2003 Jun 9. Fix simple bug preventing command line
    preprocessing directives (-I, -D, -E, -F, -P) from executing
    properly; defensive PEP 317 compliance.


    --
    Erik Max Francis && && http://www.alcyone.com/max/
    __ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
    / \ You are my martyr / I'm a vestige of a revolution
    \__/ Lamya
     
    Erik Max Francis, Jul 9, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Erik Max Francis
    Replies:
    0
    Views:
    292
    Erik Max Francis
    Aug 8, 2003
  2. Erik Max Francis
    Replies:
    0
    Views:
    303
    Erik Max Francis
    Sep 9, 2003
  3. Erik Max Francis
    Replies:
    0
    Views:
    278
    Erik Max Francis
    Sep 20, 2003
  4. Erik Max Francis
    Replies:
    0
    Views:
    274
    Erik Max Francis
    Oct 8, 2003
  5. Erik Max Francis
    Replies:
    0
    Views:
    270
    Erik Max Francis
    Oct 27, 2003
Loading...

Share This Page