先用Google搜索“how to use c++ class in python”, “如何在python中使用c++类”。 得到两个线索:“C++-SIG” 和 “ctypes”。 到python的网站去看看有什么线索:找到“extending python with c or c++”, http://python.org/doc/current/ext/intro.html python可以调用plat Api function, extern “C” 类型的函数。但是用这种方法,工作量是不是太大? SWIG simplified warpper and interface generator. swig.sf.net 看看用这个工具,是不是更简单呢? 找到一个简单的例子的http://infoloom.com/gcaconfs/WEB/paris2000/S28-04.HTM

|