Compare source code

Martin v. Loewis martin at v.loewis.de
Sun Oct 31 08:10:13 EDT 2010


> I've a project with tabs and spaces mixed (yes I know it's bad).
> 
> I edit each file to remove tabs, but it's so easy to make a mistake.
> Do you know a tools to compare the initial file with the cleaned one to
> know if the algorithms are the same ?
> By comparing pyc files for example.

Tools/scripts/reindent.py of the standard Python distribution normalizes
white space in source code. It is used to maintain normalized
indentation in the Python library itself, but you can certainly use it
also for your own files :-)

Regards,
Martin



More information about the Python-list mailing list