Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert indentation from 2 spaces to 4 spaces [duplicate]

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.

like image 847
Pavel Paulau Avatar asked Jul 27 '12 21:07

Pavel Paulau


1 Answers

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

like image 115
Andrew Clark Avatar answered Nov 08 '22 14:11

Andrew Clark