简体   繁体   English

使用Python的C ++? (不是提升)

[英]Using C++ from Python? (not boost)

I'm currently using boost-python to wrap a small C++ library and make it usable from Python. 我目前正在使用boost-python来包装一个小的C ++库并使其可以从Python中使用。 However, I'd like to stop using boost (mainly due to reasons relating to building/linking). 但是,我想停止使用boost(主要是由于与构建/链接有关的原因)。 So what other options are there? 那么还有其他选择吗?

Is there something that's equally convenient to use? 有什么东西同样方便使用吗?

There's Riverbank's SIP , Beazley's Swig , and Scott's/Dubois'/Furnish's Cxx . 有Riverbank的SIP ,Beazley的Swig和Scott的/ Dubois'/ Furnish的Cxx See also this page with other potentially relevant projects (but no direct answer to your immediate needs, I believe). 另请参阅此页面以及其他可能相关的项目(但我相信,不能直接回答您的直接需求)。

看看SWIG

Cython的语法非常Pythonic,只在必要时才违反规则。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM