6

I started writing an application in Python, but I now want to switch to C# and UWP. I know that you cannot write a UWP app in Python, but I am trying to see if I can write some code in Python and access that code from C#.

For example, writing a class in Python that C# code can access as well. Is that possible? And if so, can Python access Microsoft's UWP APIs?

The main code will not be written in Python; that would be impossible. But can interoperability between C# and Python exist, perhaps with IronPython (.NET's Python)?

And how would I set up such a Visual Studio project? I have Python Tools for Visual Studio installed, but there was no built-in option to add a Python file to my UWP app.

4

1 回答 1

5

由于框架限制,c# 中的“经典”python 解释器(如 IronPython)在商店应用程序中不起作用,因为您通过沙箱运行应用程序。

一些家伙已将完整的 python 解释器移植到mercurial上的 WinRT 。当然,由于框架限制,整个标准库都不可用。这适用于 WinRT,因此很可能适用于 UWP。

于 2015-11-01T17:55:20.823 回答