从C ++代码(.NET)运行Python脚本 [英] Running Python script from C++ code(.NET)

查看:66
本文介绍了从C ++代码(.NET)运行Python脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,伙计们!

一个微不足道的问题 - 我有一个可用的Python脚本,我必须从C ++代码调用
。没有花哨的东西 - 只需用

的参数运行整个脚本。没有回调,没有信号 - nada,只是

愚蠢,原始,直接的电话。


虽然嵌入有很多帮助,但我不能了解

如何整体运行脚本.SOS !!!!

Hello, folks!
A trivial question - I have a working Python script that I have to
invoke from C++ code. No fancy stuff - just run the whole script with
its parameters. No callbacks, no signalling - nada, just
stupid,primitive, straightforward call.

And while there is a lot of help on embedding, I could not find out how
to run script as a whole.SOS!!!!

推荐答案



volcano写道:

volcano wrote:

你好,伙计们!

一个微不足道的问题 - 我有一个有效的Python脚本我有从C ++代码调用
。没有花哨的东西 - 只需用

的参数运行整个脚本。没有回调,没有信号 - nada,只是

愚蠢,原始,直接的电话。


虽然嵌入有很多帮助,但我不能了解

如何整体运行脚本.SOS !!!!
Hello, folks!
A trivial question - I have a working Python script that I have to
invoke from C++ code. No fancy stuff - just run the whole script with
its parameters. No callbacks, no signalling - nada, just
stupid,primitive, straightforward call.

And while there is a lot of help on embedding, I could not find out how
to run script as a whole.SOS!!!!



在C#中:

http://groups.google.com/group/comp .... 7b6a89095ef930


hth


Gerard

In C#:

http://groups.google.com/group/comp....7b6a89095ef930

hth

Gerard




Gerard Flanagan写道:

Gerard Flanagan wrote:

volcano写道:
volcano wrote:

你好,伙计们!

一个微不足道的问题 - 我有一个工作的Python脚本,我必须从C ++代码调用
。没有花哨的东西 - 只需用

的参数运行整个脚本。没有回调,没有信号 - nada,只是

愚蠢,原始,直接的电话。


虽然嵌入有很多帮助,但我不能了解

如何整体运行脚本.SOS !!!!
Hello, folks!
A trivial question - I have a working Python script that I have to
invoke from C++ code. No fancy stuff - just run the whole script with
its parameters. No callbacks, no signalling - nada, just
stupid,primitive, straightforward call.

And while there is a lot of help on embedding, I could not find out how
to run script as a whole.SOS!!!!



在C#中:

http://groups.google.com/group/comp .... 7b6a89095ef930


hth


Gerard


In C#:

http://groups.google.com/group/comp....7b6a89095ef930

hth

Gerard



感谢快速响应,唉 - 它没有!

我的问题是 - 用于C ++的应用程序用于使用外部应用程序,

哪个不能正常工作。所以我在

Python脚本中重现了这个功能,但现在我卡住了,无法正常运行。

Thanks for fast response, alas - it did not!
My problem is - application in C++ used to use external application,
which does not work well. So I sort of reproduced the functionality in
Python script, but now I am stuck, unable to run it properly.




volcano写道:

volcano wrote:

Gerard Flanagan写道:
Gerard Flanagan wrote:

volcano写道:
volcano wrote:

你好,伙计们!

一个微不足道的问题 - 我有一个工作的Python脚本,我必须

从C ++代码调用。没有花哨的东西 - 只需用

的参数运行整个脚本。没有回调,没有信号 - nada,只是

愚蠢,原始,直接的电话。

>

虽然有很多帮助在嵌入时,我无法找到如何运行脚本作为一个整体.SOS !!!!
Hello, folks!
A trivial question - I have a working Python script that I have to
invoke from C++ code. No fancy stuff - just run the whole script with
its parameters. No callbacks, no signalling - nada, just
stupid,primitive, straightforward call.
>
And while there is a lot of help on embedding, I could not find out how
to run script as a whole.SOS!!!!



在C#中:

http://groups.google.com/group/comp .... 7b6a89095ef930


hth


Gerard

In C#:

http://groups.google.com/group/comp....7b6a89095ef930

hth

Gerard



感谢快速响应,唉 - 它没有!

我的问题是 - 用于C ++的应用程序用于使用外部应用程序,

哪个不能正常工作。所以我在

Python脚本中重现了这个功能,但现在我卡住了,无法正常运行它。


Thanks for fast response, alas - it did not!
My problem is - application in C++ used to use external application,
which does not work well. So I sort of reproduced the functionality in
Python script, but now I am stuck, unable to run it properly.



也许我的理解是错误的,但无法管理(.NET)C ++调用

任何其他托管程序集,在此案例(我认为)System.Diagnostics?

Gerard

Maybe my understanding is wrong, but can''t managed (.NET) C++ call into
any other managed assembly, in this case (I think) System.Diagnostics?

Gerard


这篇关于从C ++代码(.NET)运行Python脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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