For a scientific simulation I need to write some computations in C++. Since this became extremely tedious, I built myself a small code generator: In a scripting language (Python) you put together a syntax tree consisting of assignments and mathematical operations. A self-written codegenerator transforms the tree into C++ code. (Good example for the visitor pattern, by the way.) That's all fine and ok.
Now the project is growing and demand for more sophisticated code comes. It's very difficult for me to see what tools could be useful. What do people typically do and use when they have to generate program code programmatically? (With Python as "generator language" or in general)
(Sorry, but in this case, Google is really not my friend. Google can not transform a task into search results, unfortunately.)