PythoC lets you use Python as a C code generator, but with more features and flexibility than Cython provides. Here’s a first ...
Is there some trick to get translate to work right with unicode strings? I finally gave up in frustration and just used replace as well - horribly inefficient but at least it works.