space/tab conversion utility?

Grant Edwards grante at visi.com
Wed Jul 28 18:12:59 EDT 2004


On 2004-07-28, Brian van den Broek <bvande at po-box.mcgill.ca> wrote:
> Grant Edwards said unto the world upon 28/07/2004 17:49:
>
>> Is there any utility to convert Python sources from space-based
>> block indentation to tab-based?
>> 
>> You can use "expand" convert from tabs->spaces, but "unexpand"
>> isn't bright enough to do the reverse.
>> 
>
> Hi,
>
><http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65226>

I don't see how that's useful.

> There are a couple of other tab/space recipes on the site, too.

"unexpand" will do dumb conversion, but what's required is
something that understands Python block syntax.  Something
similar to C's "indent" program.

-- 
Grant Edwards                   grante             Yow!  Did YOU find a
                                  at               DIGITAL WATCH in YOUR box
                               visi.com            of VELVEETA?



More information about the Python-list mailing list