improve python support