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 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With