ANN: P4D 1.1

Kay Schluehr kay.schluehr at gmx.net
Fri Jul 11 17:14:47 EDT 2008


On 11 Jul., 15:25, Fuzzyman <fuzzy... at gmail.com> wrote:
> On Jul 11, 10:09 am, Kay Schluehr <kay.schlu... at gmx.net> wrote:
>
> > P4D = E4X style embedded DSL for Python but without E and X.
>
> > For more information see:
>
> >http://pypi.python.org/pypi/P4D/1.1-py2.5
>
> That looks a lot like YAML. Any reason to use it over YAML?
>
> Michael Foordhttp://www.ironpythoninaction.com/

I considered an embedded YAML DSL for Python a long time ago but YAML
and Python are not orthogonal. For instance YAML specifies syntax for
lists and dictionaries and also data sections which can be expressed
easily as triple quoted strings in Python. Embedding YAML is a bit
excessive.

Syntactically P4D is inspired by SLiP

http://slip.sourceforge.net/

and I'd say it is mostly Python extened by SLiP + extra syntax for
element filters and attribute access which was kept from E4X.

Why an embedded DSL and not an external one? I don't want to argue
about this but just say that you need to feel the difference. Check
out the package and start editing P4D elements on the console prompt.
It's just like a Python feature...

Notice that there was a showstopper in the initial release I
announced. It has been corrected here:

http://pypi.python.org/pypi/P4D/1.1.1-py2.5



More information about the Python-list mailing list