Frank Millman <[EMAIL PROTECTED]> writes: > On Jun 8, 5:50 pm, Neil Cerutti <[EMAIL PROTECTED]> wrote: >> Many of the file formats I have to work with are so-called >> fixed-format records, where every line in the file is a record, >> and every field in a record takes up a specific amount of space. >> >> [ ... ] > > We already have '%-12s' to space fill for a length of 12, but it is > not truly fixed-length, as if the value has a length greater than 12 > you need it to be truncated, and this construction will not do that.
In this case, we can use '%-12.12s'. -- Lloyd Zusman [EMAIL PROTECTED] God bless you. -- http://mail.python.org/mailman/listinfo/python-list