3-5 July 2006
CERN, Geneva
Europe/Zurich timezone

Python as a domain specific language

4 Jul 2006, 09:00
40-S2-A01 (CERN, Geneva)


CERN, Geneva

Python Language and Libraries Python Language and Libraries


Mr Anders Hammarquist (AB Strakt)


By using metaclasses and other powerful features of Python it is possible to use Python as a domain specific language. We will show how we replaced a domain specific language in CAPS with Python, and discuss our reasons for doing so. Using metaclasses and other meta-features, it is possible to greatly alter the behaviour of Python. We have exploited these to give us what we needed for our domain specific language, which is used to describe database object and to code fuctionality for them, while still retaining a clear syntax. The result is something not-quote-Python but still clear if you know what we are trying to do.

Primary author

Mr Anders Hammarquist (AB Strakt)


Mr Jacob Oscarsson (AB Strakt) Mr Ronny Wikh (AB Strakt)

Presentation Materials