Re: String formatting with fixed width

2007-03-16 Thread Alexander Eisenhuth
Thanks for your fast reply. I'm fine with your "%7.03f" solution. (negatives are not significant) Alexander Eisenhuth schrieb: > Hello alltogether, > > is it possible to format stings with fixed width of let's say 7 > character. T need a floating point with 3 chars before dot, padded with >

Re: String formatting with fixed width

2007-03-16 Thread Steve Holden
Steve Holden wrote: > Alexander Eisenhuth wrote: >> Hello alltogether, >> >> is it possible to format stings with fixed width of let's say 7 character. T >> need a floating point with 3 chars before dot, padded with ' ' and 3 chars >> after >> dot, padded with '0'. >> >> Followingh is my approac

Re: String formatting with fixed width

2007-03-16 Thread Jon Clements
On 16 Mar, 13:20, Alexander Eisenhuth <[EMAIL PROTECTED]> wrote: > Hello alltogether, > > is it possible to format stings with fixed width of let's say 7 character. T > need a floating point with 3 chars before dot, padded with ' ' and 3 chars > after > dot, padded with '0'. > > Followingh is my a

Re: String formatting with fixed width

2007-03-16 Thread Steve Holden
Alexander Eisenhuth wrote: > Hello alltogether, > > is it possible to format stings with fixed width of let's say 7 character. T > need a floating point with 3 chars before dot, padded with ' ' and 3 chars > after > dot, padded with '0'. > > Followingh is my approach > >>> f = 21.1 > >>> s =

String formatting with fixed width

2007-03-16 Thread Alexander Eisenhuth
Hello alltogether, is it possible to format stings with fixed width of let's say 7 character. T need a floating point with 3 chars before dot, padded with ' ' and 3 chars after dot, padded with '0'. Followingh is my approach >>> f = 21.1 >>> s = "%.03f" % f >>> s '21.100' But there are mis

String formatting with fixed width

2007-03-16 Thread Alexander Eisenhuth
Hello alltogether, is it possible to format stings with fixed width of let's say 7 character. T need a floating point with 3 chars before dot, padded with ' ' and 3 chars after dot, padded with '0'. Followingh is my approach >>> f = 21.1 >>> s = "%.03f" % f >>> s '21.100' But there are mis