Rustom Mody wrote:

Context: I am trying to generate some python code and its
indentation=structure is giving me a headache!

When I generate Python code (or anything else with an
indented structure) I usually define myself a class with
a method for writing out a line, and a pair of methods
for increasing and decreasing the indentation level.
It keeps track of the current indentation level and
automatically prepends the appropriate amount of
whitespace to each line written out.

--
Greg
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to