Use Python with C # in a Windows UWP Application

I started writing an application in Python, but now I want to switch to C # and UWP. I know that you cannot write a UWP application in Python, but I'm trying to check if I can write Python code and access this code from C #.

For example, a class entry in Python that C # code can access. Is it possible? And if so, can Python access the Microsoft UWP API?

The main code will not be written in Python; that would be impossible. But is interaction possible between C # and Python, possibly with IronPython (.NET Python)?

And how do I create such a Visual Studio project? I have Python Tools for Visual Studio, but there was no built-in option to add a Python file to my UWP application.

+5
source share
1 answer

The "classic" python interpreters in C # (like IronPython) do not work in store apps due to frame limitations as you launch your application through the sandbox.

Some dudes have ported the full python interpreter to WinRT on mercurial . Of course, due to the limitations of the framework, the entire standard library is not available. This works with WinRT, so it will most likely work with UWP.

+3
source

Source: https://habr.com/ru/post/1234934/


All Articles