Given that there are C formatters that do a decent job (indent), it
should be possible to write a Python formatter (written in Python :-)
that accepts block delimiters and formats the code accordingly. This
could be a two way function, in that the formatter could take well
formatted Python code and add delimiters.
If the Python compiler would allow for an optional filter, you're all
set. This can even work with code within a string literal, given that
the formatter is smart enough to recognize it and know how to add
newlines to a string literal.
Of course, this will not solve the coding for C programs calling the
Python interpreter (unless... :-).
Anyways, just a thought.
-Jaap-
-Jaap-
-- Jaap Vermeulen +--------------------------+ | Sequent Computer Systems | Internet : jaap@sequent.com | Beaverton, Oregon | Uucp : ...uunet!sequent!jaap +--------------------------+