> However, if I do that I get errors saying that all args were not > converted during string formatting. An escaped 'i' does not work > either.
You need to format the string twice - first, to generate the float
formatting string, and then to format the string.
Like this:
num = 7.12345678901234567
for i in xrange(3,7):
print ("%%.%if" % i) % num
Note the %% that produces a single % for the second string interpolation.
Diez
--
http://mail.python.org/mailman/listinfo/python-list
