[Python-talk] Module to massage text file for better output?
Ted Roche
tedroche at tedroche.com
Mon Jul 16 09:05:57 EDT 2007
Hewitt_Tech wrote:
> The problem is that some of the data is aligned in fixed size fields
> that are much larger than necessary. What I'd like to have for output is
> data in fixed size fields that are more optimal.
I know you were asking for a Python solution, but the GNH coreutils text
tools have this kind of functionality built right into them, too. The
'cut' command can be used to cut columns out of a text file, either by
specifying columns, their separators, or byte ranges. 'man cut' ought to
get you started.
--
Ted Roche
Ted Roche & Associates, LLC
http://www.tedroche.com
More information about the Python-talk
mailing list