Sure, here you do. It's Python but wrapped in an X...
# klayout
y
Sure, here you do. It's Python but wrapped in an XML file but if you open it in KLayouts macro editor it will do the correct syntax highlight etc.