WPF应用程序所需的Python解释器.(Python脚本执行) [英] Required Python Interpreter for WPF Application.(Python Scripts Execution)

查看:335
本文介绍了WPF应用程序所需的Python解释器.(Python脚本执行)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我正在寻找与我的WPF应用程序兼容的Python解释器,我需要支持Python脚本并执行它们,我具有CINT(C/C ++脚本)的有效实现,

请在下面找到详细信息,

1. Python解释器模块(包装器)应与CINT解释器共存.(详细说明,我有构建C/C ++脚本的脚本窗口(使用CINT解释器),但它也应能够处理Python脚本(使用Python解释器) ).

2.减少对许可证T&的限制. C(最好是BSD或LGPL性质).


环境:Window 7 O/S,SP1,VS 2008 IDE

在此先感谢,

问候,
VishalK_89

Hi All,


I am looking for Python Interpreter to be compatible with my WPF Application, I need to support Python Scripts and execute the same, I have the working implementation of CINT (C/C++ Scripts),

Please find details below,

1. The Python Interpreter module(wrapper) should co-exist with CINT Interpreter.(To elaborate, I have Script Window building C/C++ Scripts (using CINT interpreter), but it should also be able to handle Python Scripts (using Python Interpreter).

2. Less restrictions on License T & C (preferably of BSD or LGPL nature).


Environ: Window 7 O/S, SP1, VS 2008 IDE

Thanks in Advance,

With Regards,
VishalK_89

推荐答案

使用控制台Python应用程序,可以使用System.Diagnostics.Process.Start作为子进程启动它,并重定向输出流StandardOutputStandardError,请在此处查看具有重定向的代码示例: http://msdn.microsoft.com /en-us/library/system.diagnostics.process.standardoutput.aspx [ http://pythonnet.sourceforge.net/readme.html [
With a console Python application, it is possible to start it as a child process using System.Diagnostics.Process.Start and redirect output streams StandardOutput and StandardError, please see the code sample with redirection here: http://msdn.microsoft.com/en-us/library/system.diagnostics.process.standardoutput.aspx[^].

However, this is a pretty awkward way of doing things.

For seamless integration, I would look at Python for .NET:
http://pythonnet.sourceforge.net/readme.html[^].

—SA


这篇关于WPF应用程序所需的Python解释器.(Python脚本执行)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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