On Mon, 22 Oct 2007 09:44:27 +0000 (UTC), Paul Brauner <[EMAIL PROTECTED]> wrote: > [snip] > I thought that it must exists because everyone generating python code will >encounter more or less the same problem, but I didn't find any 'official' >thing on the subject.
I expect many projects which emit Python code actually emit Python code. Getting the indentation right isn't much of a chore at all. If you need some help to get it right, maybe this will get you going in the right direction: http://twistedmatrix.com/trac/browser/sandbox/exarkun/ast/ast_pp.py It's just some throw-away code, but it at least manages to indent code properly. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list