wq C example as python