Windows 应用商店应用 Python 3 For Metro声称它允许用户编辑和运行 Python 文件(我无法让它工作)。在沙箱中这怎么可能?我可以从我的 JavaScript 应用程序运行文件(例如桌面上的 test.py
)吗?
最佳答案
How is this possible from within the sandbox?
我已将 Python 解释器移植到 WinRT 以实现此目的。它现在不使用 Win32 API,而是使用 WinRT API(特别是用于从用户的文档文件夹中读取文件)。
Can I run a file (say test.py on the desktop) from my JavaScript app?
原则上是的。您需要从我的应用程序中获取 python33.dll,将其包装为 WinRT 组件,然后调用它。它实际上已经是一个 WinRT 组件,但不公开任何 Python API。见
http://hg.python.org/sandbox/loewis/file/ee9f8c546ddd/win8app/python33
关于Windows 应用商店应用中的 Python,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14211949/