PyDocs

Nav

Generic Operating System Services

c_float

ctypes

class (source)
Represents the C float datatype. The constructor accepts an optional float initializer.
1 Example
>>> i = c_int()
>>> f = c_float()
>>> s = create_string_buffer(b'\000' * 32)
>>> print(i.value, f.value, repr(s.value))
0 0.0 b''
>>> libc.sscanf(b"1 3.14 Hello", b"%d %f %s",
...             byref(i), byref(f), s)
3
>>> print(i.value, f.value, repr(s.value))
1 3.1400001049 b'Hello'
>>>
from the Python docs
See Also
No see-alsos for ctypes/c_float
0 Notes
No notes for c_float