Now uses python if it exists or uses default c code