Drag and drop for everything seems like wasted effort for something like this. If you are savvy enough to use exotic formulas for generating data files, you don't need no stinkin' drag and drop in a cluttered interface.

Something like Kwok's suggestion would IMO be better; even "hard text" is still technically a formula.
Why not just keep the template code in Python? You can have the templatizer write out python scripts, then execute them. In fact, this would be preferable, basically building a front-end to the current python templatizer. This way, advanced users can just make/edit the python scripts directly. In also has the advantage of not wasting time duplicating all of your previous efforts.
