Python extension