Re: print with variable justification (with *)

2006-11-18 Thread John Machin
tom wrote: > John Machin wrote: > > Not quite so many folks come to Python with a background in C these > > days. Is anyone aware of a tutorial that covers % formatting from a > > standing start? > If you're on a unix system you can probably do `man fprintf`, but it > will mean wading through a l

Re: print with variable justification (with *)

2006-11-18 Thread tom
John Machin wrote: > tom wrote: > >> Why Tea wrote: >> >>> print format % values >>> An optional minimum width of the conversion, specified using one or >>> more digits or an asterisk (*), which means that the width is taken >>> from the next item in values >>> >>> That's from one of O'reil

Re: print with variable justification (with *)

2006-11-18 Thread John Machin
tom wrote: > Why Tea wrote: > > print format % values > > An optional minimum width of the conversion, specified using one or > > more digits or an asterisk (*), which means that the width is taken > > from the next item in values > > > > That's from one of O'reilly's books. But there is no example

Re: print with variable justification (with *)

2006-11-18 Thread Why Tea
> In [50]: '%*s' % (5, 'spam') > Out[50]: ' spam' > Marc, that's exactly what I need. Thanks! /Why Tea -- http://mail.python.org/mailman/listinfo/python-list

Re: print with variable justification (with *)

2006-11-18 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Why Tea wrote: > print format % values > An optional minimum width of the conversion, specified using one or > more digits or an asterisk (*), which means that the width is taken > from the next item in values > > That's from one of O'reilly's books. But there is no exampl

Re: print with variable justification (with *)

2006-11-18 Thread tom
Why Tea wrote: > print format % values > An optional minimum width of the conversion, specified using one or > more digits or an asterisk (*), which means that the width is taken > from the next item in values > > That's from one of O'reilly's books. But there is no example and I > couldn't get it

print with variable justification (with *)

2006-11-18 Thread Why Tea
print format % values An optional minimum width of the conversion, specified using one or more digits or an asterisk (*), which means that the width is taken from the next item in values That's from one of O'reilly's books. But there is no example and I couldn't get it to work by trials and errors