3–5 Jul 2006
CERN, Geneva
Europe/Zurich timezone

Python as a domain specific language

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

40-S2-A01

CERN, Geneva

Python Language and Libraries Python Language and Libraries

Speaker

Mr Anders Hammarquist (AB Strakt)

Description

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)

Co-authors

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

Presentation materials