Casey Duncan wrote:
Here's the moral-equivalent one-liner in Python: print open("myfile.py").read().replace(" "*4, "\t")
Note that this is not exactly the right way to expand tabs, since it doesn't take account of the position in the line at which the block of spaces starts. But it's okay if all you care about is leading indentation. -- Greg