3 ms·
Can I write tools that use PowerShell and .NET objects in non-.NET languages, like Python or Perl (using the C implementations, not a .net python)? Like, is the
by perlgeek 10y ago
Can I write tools that use PowerShell and .NET objects in non-.NET languages, like Python or Perl (using the C implementations, not a .net python)? Like, is there an API that I can implement to interact to implement PowerShell-like "native" tools?
- zhengyi13 10y agoIt's not the most efficient way to do it, but if you just want to get it done, Powershell has had e.g. ConvertTo-Json since version 3, I think? You can serialize pretty much anything at that point, and just hand that off to your target language. If you're talking an FFI though, not so much, I think.
- denfromufa 10y agouse pythonnet to interact with .NET dlls from CPython: https://github.com/pythonnet/pythonnet https://github.com/pythonnet/pythonnet