ctp wrapper for python