Use Python, rather than awk & shell, to generate events.h