Re: how to normalize indentation sources

2006-05-25 Thread John Salerno
John Machin wrote: remove empty lines at the end of files. Also ensure the last line ends with a newline. don't those two things conflict with one another? or is the newline added after empty lines are removed? -- http://mail.python.org/mailman/listinfo/python-list

Re: how to normalize indentation sources

2006-05-25 Thread Tim Peters
[John Machin, quoting reindent.py docs] remove empty lines at the end of files. Also ensure the last line ends with a newline. [John Salerno] don't those two things conflict with one another? No. This is the repr of a file with (3) empty lines at the end: a file\n\n \n \t\n

Re: how to normalize indentation sources

2006-05-25 Thread John Salerno
Tim Peters wrote: [John Machin, quoting reindent.py docs] remove empty lines at the end of files. Also ensure the last line ends with a newline. [John Salerno] don't those two things conflict with one another? No. This is the repr of a file with (3) empty lines at the end: a

Re: how to normalize indentation sources

2006-05-25 Thread John Machin
On 26/05/2006 2:38 AM, John Salerno wrote: [snip] So the line below the last line of the file isn't actually considered an empty line, even though you can move the cursor to it in a text editor? That line doesn't exist in a file *until* you (a) type something into the editor and (b) save

how to normalize indentation sources

2006-05-24 Thread AndyL
Hi, I have a lot of sources with mixed indentation typically 2 or 4 or 8 spaces. Is there any way to automatically convert them in let's say 4 spaces? Thx, A. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to normalize indentation sources

2006-05-24 Thread John Machin
On 25/05/2006 12:00 PM, AndyL wrote: Hi, I have a lot of sources with mixed indentation typically 2 or 4 or 8 spaces. Is there any way to automatically convert them in let's say 4 spaces? Yup. Right under your nose: C:\junk\python24\tools\scripts\reindent.py --help reindent

Re: how to normalize indentation sources

2006-05-24 Thread AndyL
John Machin wrote: On 25/05/2006 12:00 PM, AndyL wrote: Hi, I have a lot of sources with mixed indentation typically 2 or 4 or 8 spaces. Is there any way to automatically convert them in let's say 4 spaces? Yup. Right under your nose: C:\junk\python24\tools\scripts\reindent.py