Boost.Python向python里面传递字符串时,引号是个很关键的问题。
const char* cstr="hello \" world" // hello " world
python的方法如下:
def run(self,command): print command
打印的是:hello " world
所以c++向python传递字符串的时候 ,引号不需要转义