Hi Frankie,
On 11 November 2011 12:59, Cranky Frankie 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 lo
On Fri, Nov 11, 2011 at 1:59 PM, Cranky Frankie
wrote:
> Thank you for your help on this. Now for "the rest of the story."
>
> 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
On 2011/11/11 02:59 PM, Cranky Frankie wrote:
Thank you for your help on this. Now for "the rest of the story."
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
Thank you for your help on this. Now for "the rest of the story."
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 li
>1) Using string formatting:
> >>> print("x{0}x{1}x".format(" " * 38, " " * 9))
You can specify alignment and padding with string formatting too. It just
requires you to know the formatting mini-language.
>>> 'x{0:>40}x{1:^30}x{2:<40}'.format( 'right', 'center' , 'left' )
'x
On 2011-11-10 21:54, Cranky Frankie wrote:
What is the easiest way in Python 3.x to write output positionally?
For example I have one literal I want in column 1, the next one in
column 40, the third one in column 50. I've tried usings tabs and I'm
not getting what I want. Is it something to do wi
On 11/10/2011 03:54 PM, Cranky Frankie wrote:
What is the easiest way in Python 3.x to write output positionally?
For example I have one literal I want in column 1, the next one in
column 40, the third one in column 50. I've tried usings tabs and I'm
not getting what I want. Is it something to do
What is the easiest way in Python 3.x to write output positionally?
For example I have one literal I want in column 1, the next one in
column 40, the third one in column 50. I've tried usings tabs and I'm
not getting what I want. Is it something to do with C style printf
formatting? An example woul