Re: Code reformater?

2007-01-22 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], Vincent Delporte wrote: On Sun, 21 Jan 2007 14:15:46 +1100, Steven D'Aprano [EMAIL PROTECTED] wrote: Still, it is better not to lose the indentation in the first place. Thanks for the tips. But it does happen when copy/pasting code from either a web page or an e-mail

Re: Code reformater?

2007-01-21 Thread Vincent Delporte
On Sun, 21 Jan 2007 14:15:46 +1100, Steven D'Aprano [EMAIL PROTECTED] wrote: Still, it is better not to lose the indentation in the first place. Thanks for the tips. But it does happen when copy/pasting code from either a web page or an e-mail that TABs are messed up, which is not a problem with

Re: Code reformater?

2007-01-20 Thread Mario Wehbrink
Vincent Delporte schrieb in comp.lang.python: Hi When I copy/paste Python code from the web, every so often, the TABs are wrong, which means that the code won't work and I have to manually reformat the code. Is there a code reformater that can parse the code to make it right? It may

Re: Code reformater?

2007-01-20 Thread Siggi
Vincent Delporte wrote: Hello When I copy/paste Python code from the web, every so often, the TABs are wrong, which means that the code won't work and I have to manually reformat the code. Is there a code reformater that can parse the code to make it right? Thanks. Maybe my thread help

Re: Code reformater?

2007-01-20 Thread Gabriel Genellina
At Saturday 20/1/2007 14:37, Siggi wrote: When I copy/paste Python code from the web, every so often, the TABs are wrong, which means that the code won't work and I have to manually reformat the code. Is there a code reformater that can parse the code to make it right? Thanks. Maybe my

Re: Code reformater?

2007-01-20 Thread Steven D'Aprano
On Sat, 20 Jan 2007 23:51:24 -0300, Gabriel Genellina wrote: As the indentation *is* significant in python, none of the above can help if you lose the indentation. Try to reconstruct this: def foo(): if a0: if b0: print 1 print 2 else: return 3 return 4 The tools may help to make

Re: Code reformater?

2007-01-20 Thread Gabriel Genellina
At Sunday 21/1/2007 00:15, Steven D'Aprano wrote: On Sat, 20 Jan 2007 23:51:24 -0300, Gabriel Genellina wrote: As the indentation *is* significant in python, none of the above can help if you lose the indentation. Try to reconstruct this: def foo(): if a0: if b0: print 1 print 2 else:

Code reformater?

2007-01-19 Thread Vincent Delporte
Hello When I copy/paste Python code from the web, every so often, the TABs are wrong, which means that the code won't work and I have to manually reformat the code. Is there a code reformater that can parse the code to make it right? Thanks. -- http://mail.python.org/mailman/listinfo

Re: Code reformater?

2007-01-19 Thread Ben Finney
Vincent Delporte [EMAIL PROTECTED] writes: When I copy/paste Python code from the web, every so often, the TABs are wrong, which means that the code won't work and I have to manually reformat the code. Is there a code reformater that can parse the code to make it right? Indentation