一个管理C++代码到Python转换的工具。
seasnake的Python项目详细描述
一个管理C++代码到Python转换的工具。
有时你会发现一个很好的算法,但是 该算法的实现是用C或C++编写的。在某些情况下 在Python C模块中封装C/C++代码是可能的。 但是,如果C模块不是一个选项,则需要能够转换 将C/C++实现为纯Python实现。
Seasnake是为自动转换WebKit源而编写的 变成一个可以由Colosseum使用的版本。
快速启动
在virtualenv中,安装seasnake,然后运行它,传入 C++源文件的名称(或文件),如果您想提供 头以及cpp文件):
$ pip install seasnake $ seasnake path/to/MyClass.h path/to/MyClass.cpp -o MyClass
这将生成一个MyClasspython模块。
社区
海蛇是BeeWare suite的一部分。您可以通过以下方式与社区对话:
- @pybeeware on Twitter
- The BeeWare Users Mailing list, for questions about how to use the BeeWare suite.
- The BeeWare Developers Mailing list, for discussing the development of new features in the BeeWare suite, and ideas for new tools for the suite.
贡献
如果你遇到海蛇的问题,log them on GitHub。如果你 想要贡献代码,请fork the code和submit a pull request