Le Tue, 04 May 2010 11:27:58 -0400, Zvezdan Petkovic a écrit :
> 
> A simple replacement of a tab with 4 spaces as you propose does not work
>  on such a code.

Right, I was simplifying a bit.

I've just written a script which does a slightly more elaborate 
reindentation of C files, but still with the main objective of replacing 
tabs with 4-spaces indents. It shows good results on most of the source 
tree. In particular, it handles continuation lines and keeps vertical 
alignment correct in the majority of cases. This script could probably be 
applied with little a posteriori manual intervention.

It can be found in trunk/sandbox/untabify/untabify.py.

Regards

Antoine.

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to