Re: unusual exponential formatting puzzle

2005-09-22 Thread Neal Becker
Paul Rubin wrote: > Neal Becker <[EMAIL PROTECTED]> writes: >> Like a puzzle? I need to interface python output to some strange old >> program. It wants to see numbers formatted as: >> >> e.g.: 0.23456789E01 > > Yeah, that was normal with FORTRAN. > >> My solution is to print to a string with

Re: unusual exponential formatting puzzle

2005-09-21 Thread Paul Rubin
Neal Becker <[EMAIL PROTECTED]> writes: > Like a puzzle? I need to interface python output to some strange old > program. It wants to see numbers formatted as: > > e.g.: 0.23456789E01 Yeah, that was normal with FORTRAN. > My solution is to print to a string with the '% 16.9E' format, then >

Re: unusual exponential formatting puzzle

2005-09-21 Thread Michael Spencer
Michael Spencer wrote: > Neal Becker wrote: > >>Like a puzzle? I need to interface python output to some strange old >>program. It wants to see numbers formatted as: >> >>e.g.: 0.23456789E01 >> >>That is, the leading digit is always 0, instead of the first significant >>digit. It is fixed width

Re: unusual exponential formatting puzzle

2005-09-21 Thread Michael Spencer
Neal Becker wrote: > Like a puzzle? I need to interface python output to some strange old > program. It wants to see numbers formatted as: > > e.g.: 0.23456789E01 > > That is, the leading digit is always 0, instead of the first significant > digit. It is fixed width. I can almost get it with

Re: unusual exponential formatting puzzle

2005-09-21 Thread Neal Becker
[EMAIL PROTECTED] wrote: > > [EMAIL PROTECTED] wrote: >> Neal Becker wrote: >> > Like a puzzle? I need to interface python output to some strange old >> > program. It wants to see numbers formatted as: >> > >> > e.g.: 0.23456789E01 >> > >> > That is, the leading digit is always 0, instead of th

Re: unusual exponential formatting puzzle

2005-09-21 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: > Neal Becker wrote: > > Like a puzzle? I need to interface python output to some strange old > > program. It wants to see numbers formatted as: > > > > e.g.: 0.23456789E01 > > > > That is, the leading digit is always 0, instead of the first significant > > digit. It is

Re: unusual exponential formatting puzzle

2005-09-21 Thread [EMAIL PROTECTED]
Neal Becker wrote: > Like a puzzle? I need to interface python output to some strange old > program. It wants to see numbers formatted as: > > e.g.: 0.23456789E01 > > That is, the leading digit is always 0, instead of the first significant > digit. It is fixed width. I can almost get it with '