开发者

Powershell integration with Python (not IronPython)

I know it is possible to use Powershell from within IronPython, but is this possible using CPython beyond using Popen() and other similar calls? I'm trying to开发者_如何学Python do some very basic NET framework programming (windows Forms, etc.) like you can do inside of IronPython using CPython.

Thanks!

Any help appreciated.


I am not sure why you got downvoted as this is a legitimate question. I think the best integration you are going to get trying to integrate PowerShell into CPython will be through spawning a new process and passing in the PowerShell script you want run. Unfortunately this will also mean parsing any output that is generated as well. There is not a COM or C library you can really link against to get much better.

There might be some sort of a general .NET interop library for CPython (I haven't checked), but that may be an option, using that layer you could (at least in theory) use the same techniques as embedding the PowerShell runtime into a regular .NET App.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜