June 2017
Beginner to intermediate
274 pages
6h 49m
English
It's pretty common for C functions to accept a pointer as one of the parameters and fill in a value at the address that the pointer refers to. Naturally, ctypes allows us to work with this sort of interface by letting us create objects that represent memory locations and passing that object using the pointer to the functions we call. The C scanf function works in a way that can be illustrated by the following code example:

In this example, we created two C-style variables called integer and decimal; then, we used the scanf function to fill them with values, based on user input. The byref function ...
Read now
Unlock full access