[Tutor] positional output

Walter Prins wprins at gmail.com
Fri Nov 11 15:09:41 CET 2011


Hi Frankie,

On 11 November 2011 12:59, Cranky Frankie <cranky.frankie at gmail.com> wrote:

> I'm trying to build a script to parse IBM AIX DB2 DDL to line up the
> data types (it drives me crazy when the column data types are not
> lined up). For example, typical create table DDL might be hundreds of
> lines long but will look like this:
>

Just knocked this up:
http://pastie.org/2847380

It reformats the example you posted, at least, and should leave lines that
are not field definitions alone (thanks to looking for the start of the
datatype after the space.) Hopefully you can get some inspiration form it.

Walter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20111111/afcb60a1/attachment.html>


More information about the Tutor mailing list