add python support, but not perfect.