Run python script from UWP

后端 未结 1 1308
难免孤独
难免孤独 2021-01-27 23:09

I\'ve already read and researched all over the net including here: Windows Universal Apps: Call python method from C# [closed]

And I understand that UWP is a sandbox an

相关标签:
1条回答
  • 2021-01-27 23:17

    If your app is intended to run on the Python script only on PC (and not on phones, HoloLens, xbox, etc.) then you can use an API from the UWP desktop extension SDK:

    FullTrustProcessLauncher

    This API allows you to launch regular full trust EXEs that are included in your app package from your UWP. Those EXEs will then run outside of the appcontainer sandbox and you can execute things like Python scripts (and many more scenarios). When using this API your app can continue to be run on HoloLens etc., but it won't be able to launch those full trust processes on those platforms.

    I have a tutorial on this topic on my blog: https://stefanwick.com/2018/04/06/uwp-with-desktop-extension-part-1/

    0 讨论(0)
提交回复
热议问题