It has never been a problem for me as I learned that tabs are evil several years before I started programming with Python. However Pmw has several files that contain tabs. This led me to search for help... I was pleased to find that tools already exist in the Python directories.
The first: tabnanny.py checks files for mixtures of tabs and spaces.
The second reindent.py fixes problems.
$ python /sw/lib/python2.5/tabnanny.py -v .
# remove -v for less output
$ python /sw/lib/python2.5/Tools/scripts/reindent.py -d -r -v .
# remove -d to change files
No comments:
Post a Comment