Testo nascosto - clicca qui# ----------------------------------------------------------------------------------- # Format float into a string with nfield.ndecimal fixed output. | # ----------------------------------------------------------------------------------- def formatfloat( x, nfield, ndecimal ) : formatstring = '%+' + str( nfield ) + '.' + str( ndecimal ) + 'f' xstr = formatstring % x return xstr