an example of extending python with c