如何传递一个值到c ++从python和回来? [英] how to pass a value to c++ from python and back?

查看:126
本文介绍了如何传递一个值到c ++从python和回来?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想传递值从python到一个c + +程序加密从一个python程序,然后从那里返回值到python程序。如何做呢?

i would like to pass values from python to a c++ program for an encryption from inside a python program and then return the value from there to the python program . how to do it?

推荐答案

正如在另一篇文章中所说的,正确的解决方案是使用PyObject。
如果你想有一个双向通信C ++& Python,Boost Python对你来说很有趣。查看网站 Boost Python

As said msw in the other post, the proper solution is using PyObject. If you want to have a two-way communication between C++ & Python, Boost Python would be interesting for you. Take a look at website Boost Python,

这个帖子也很有趣:
如何在不构建模块的情况下将C ++类暴露给Python

这篇关于如何传递一个值到c ++从python和回来?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆