python with braces pre-processor

2007-10-22 Thread Paul Brauner
Hi, I'm working on a project that outputs several languages including (hopefully) python. My problem is that the generic backend architecture has not been designed to output correctly indented code, and that would be helpful if there were somewhere a python pre-processor that would take python

Re: python with braces pre-processor

2007-10-22 Thread Ant
On Oct 22, 10:44 am, Paul Brauner [EMAIL PROTECTED] wrote: Hi, I'm working on a project that outputs several languages including (hopefully) python. My problem is that the generic backend architecture has not been designed to output correctly indented code, and that would be helpful if there

Re: python with braces pre-processor

2007-10-22 Thread Paul Brauner
I'll look at that. Thanks a lot ! -- http://mail.python.org/mailman/listinfo/python-list

Re: python with braces pre-processor

2007-10-22 Thread Marc 'BlackJack' Rintsch
On Mon, 22 Oct 2007 09:44:27 +, Paul Brauner wrote: Hi, I'm working on a project that outputs several languages including (hopefully) python. My problem is that the generic backend architecture has not been designed to output correctly indented code, and that would be helpful if there

Re: python with braces pre-processor

2007-10-22 Thread Ant
On Oct 22, 10:58 am, Paul Brauner [EMAIL PROTECTED] wrote: I'll look at that. Thanks a lot ! I've just had a look, it's the pindent.py script in Tools/Scripts (at least it is on Windows). It takes code of the following form: def foobar(a, b): if a == b: a = a+1 elif a b: b

Re: python with braces pre-processor

2007-10-22 Thread Jean-Paul Calderone
On Mon, 22 Oct 2007 09:44:27 + (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

Re: python with braces pre-processor

2007-10-22 Thread Paul Brauner
Le Mon, 22 Oct 2007 05:00:02 -0700, Ant a écrit : On Oct 22, 10:58 am, Paul Brauner [EMAIL PROTECTED] wrote: I'll look at that. Thanks a lot ! I've just had a look, it's the pindent.py script in Tools/Scripts (at least it is on Windows). It takes code of the following form: def foobar(a,