Re: float print formatting

2007-02-13 Thread hg
Grant Edwards wrote: > On 2007-02-13, hg <[EMAIL PROTECTED]> wrote: >> Hi, >> >> Considering the float 0.0, I would like to print 00.00. >> >> I tried '%02.02f' % 0.0 ... but I get 0.00 > ^^ > That's the specifierfor how many total columns you want to use > (including the decimal point

Re: float print formatting

2007-02-13 Thread Grant Edwards
On 2007-02-13, hg <[EMAIL PROTECTED]> wrote: > Hi, > > Considering the float 0.0, I would like to print 00.00. > > I tried '%02.02f' % 0.0 ... but I get 0.00 ^^ That's the specifierfor how many total columns you want to use (including the decimal point and all digits to either side). >

Re: float print formatting

2007-02-13 Thread hg
Neil Cerutti wrote: > The eighth-graders will be presenting Shakespeare's Hamlet in the church > basement on Friday at 7 p.m. The congregation is invited to attend this > tragedy. --Church Bulletin Blooper ;-) I like that ! hg -- http://mail.python.org/mailman/listinfo/python-list

Re: float print formatting

2007-02-13 Thread Neil Cerutti
On 2007-02-13, hg <[EMAIL PROTECTED]> wrote: > Neil Cerutti wrote: > >> On 2007-02-13, hg <[EMAIL PROTECTED]> wrote: >>> Hi, >>> >>> Considering the float 0.0, I would like to print 00.00. >>> >>> I tried '%02.02f' % 0.0 ... but I get 0.00 >>> >>> Any clue ? >> >> Yes. How wide (total) is "0.00",

Re: float print formatting

2007-02-13 Thread hg
Peter Otten wrote: > hg wrote: > >> Considering the float 0.0, I would like to print 00.00. >> >> I tried '%02.02f' % 0.0 ... but I get 0.00 >> >> Any clue ? > > The first integer specifies the total width: > "%05.2f" % 0 > '00.00' > > Peter Many thanks ! hg -- http://mail.python.or

Re: float print formatting

2007-02-13 Thread Peter Otten
hg wrote: > Considering the float 0.0, I would like to print 00.00. > > I tried '%02.02f' % 0.0 ... but I get 0.00 > > Any clue ? The first integer specifies the total width: >>> "%05.2f" % 0 '00.00' Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: float print formatting

2007-02-13 Thread hg
Neil Cerutti wrote: > On 2007-02-13, hg <[EMAIL PROTECTED]> wrote: >> Hi, >> >> Considering the float 0.0, I would like to print 00.00. >> >> I tried '%02.02f' % 0.0 ... but I get 0.00 >> >> Any clue ? > > Yes. How wide (total) is "0.00", compared to "00.00"? > > -- > Neil Cerutti I do not get

Re: float print formatting

2007-02-13 Thread Neil Cerutti
On 2007-02-13, hg <[EMAIL PROTECTED]> wrote: > Hi, > > Considering the float 0.0, I would like to print 00.00. > > I tried '%02.02f' % 0.0 ... but I get 0.00 > > Any clue ? Yes. How wide (total) is "0.00", compared to "00.00"? -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-li