float does not parse '0.000000E+00'
Darrell Gallion
darrell at dorb.com
Sat Jun 3 20:37:54 EDT 2000
Paolo Redaelli wrote:
> but if I run a program that does x=float(x) where x = "0.000000E+00 "
> (being a string) here's the output.
>
> ===========================
> [paolo at aldebaran Telaio]$ ./pyplot.py
> x(<type 'string'>)='0.000000E+00' y(<type 'string'>)='0.000000E+00'
> Traceback (innermost last):
> File "./pyplot.py", line 198, in ?
> t = Telaio()
> File "./pyplot.py", line 172, in __init__
> x = float(x)
> ===========================
Pasted this into a .py file and it worked fine.
a = "0.000000E+00"
print float(a)
--Darrell Gallion
More information about the Python-list
mailing list