looking for tips on how to implement "ruby-style" Domain Specific Language in Python

Kay Schluehr kay.schluehr at gmx.net
Tue Jan 6 14:42:55 EST 2009


> How would one approach this in Python? Do I need to build a custom
> loader which compiles *.dsl files to *.pyc files? Is it possible to
> switch between the custom DSL and the standard Python interpreter?

Sure, but there is no way to avoid extending the Python parser and
then your DSL becomes external.

I remember having had a similar discussion a while ago with Kevin
Dangoor the original TurboGears developer who has also written Paver
[1]. In the end DSL syntax wasn't worth the hassle and Kevin developed
Paver entirely in Python.

Kay

[1] http://www.blueskyonmars.com/projects/paver/





More information about the Python-list mailing list