> 1. how can I format outfile so i can write multiple lines > and then apend multiple lines later before closing the file?
I think you mean add a new column to the existing lines? try something like line = line + '%25s' % newdata > 2. how can I make data formatting string '%25s' intiger (in this case 25) a variable? Just create the string outsoide the formatting line: fmtString = '%%ds' % width s = fmtString % data HTH, Alan G Author of the Learn to Program web tutor http://www.freenetpages.co.uk/hp/alan.gauld _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor