How to convert indentation from 2 spaces to 4 spaces

Pavel Paulau picture Pavel Paulau · Jul 27, 2012 · Viewed 7.6k times · Source

Possible Duplicate:
HOWTO: Fix Python Indentation

I have Python library where only 2 spaces indentation was used. I need automated way to convert all files to 4 spaces indentation. Is there any tool/script/editor for that?

Plz don't suggest Emacs.

Answer

Andrew Clark picture Andrew Clark · Jul 27, 2012

Try the reindent script by Tim Peters, it was designed specifically for converting Python files to 4-space indentation.