跳转到主要内容

从Python访问Windows运行时API

项目描述

Python/WinRT

Windows运行时Python投影(Python/WinRT)允许Python开发者以自然和熟悉的方式从Python直接访问Windows运行时API

入门

先决条件

安装

Python/WinRT可以通过pip从Python包索引安装。假设pip在路径上,Python/WinRT可以通过以下命令在命令行中安装:

> pip install winrt

您可以通过启动Python并运行以下Python代码片段来测试Python/WinRT是否正确安装。它应该在控制台打印https://github.com/Microsoft/xlang/tree/master/src/tool/python

import winrt.windows.foundation as wf
u = wf.Uri("https://github.com/")
u2 = u.combine_uri("Microsoft/xlang/tree/master/src/tool/python")
print(str(u2))

有关从Python访问Windows Runtime API的更多信息,请访问Python/WinRT的主页

有关使用Python/WinRT的完整示例,请参阅xlang GitHub仓库中示例文件夹的WinML教程

项目详情


下载文件

下载适用于您平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。

源分发

本发布版本没有可用的源分发文件。请参阅生成分发存档教程

构建分发

winrt-1.0.21033.1-cp39-none-win_amd64.whl (4.2 MB 查看哈希)

上传时间 CPython 3.9 Windows x86-64

winrt-1.0.21033.1-cp39-none-win32.whl (4.7 MB 查看哈希)

上传时间 CPython 3.9 Windows x86

winrt-1.0.21033.1-cp38-none-win_amd64.whl (4.2 MB 查看哈希)

上传时间 CPython 3.8 Windows x86-64

winrt-1.0.21033.1-cp38-none-win32.whl (4.7 MB 查看哈希)

上传时间 CPython 3.8 Windows x86

winrt-1.0.21033.1-cp37-none-win_amd64.whl (4.2 MB 查看哈希)

上传时间 CPython 3.7 Windows x86-64

winrt-1.0.21033.1-cp37-none-win32.whl (4.8 MB 查看哈希)

上传时间 CPython 3.7 Windows x86

由以下支持