Logo Search packages:      
Sourcecode: cclib version File versions  Download package

def cclib::parser::logfileparser::Logfile::float (   self,
  number 
) [inherited]
Convert a string to a float avoiding the problem with Ds.

>>> t = Logfile("dummyfile")
>>> t.float("123.2323E+02")
12323.23
>>> t.float("123.2323D+02")
12323.23

Definition at line 286 of file logfileparser.py.

                          :
        """Convert a string to a float avoiding the problem with Ds.

        >>> t = Logfile("dummyfile")
        >>> t.float("123.2323E+02")
        12323.23
        >>> t.float("123.2323D+02")
        12323.23
        """
        number = number.replace("D","E")
        return float(number)


Generated by  Doxygen 1.6.0   Back to index