Fix Python source code to use spaces instead of tabs

What if someone gave you a Python source file that is indented using tabs? If you are using emacs, the following will let you convert it back to using spaces: [shell] # first set the buffer tab width to 4 (or whatever you like) M-x set-variable <return> tab-width <return> 4

# then mark the entire file C-x h

# do untabify to convert: M-x untabify <return> [/shell]

# That's it!

Technorati Tags: ,