python - Tkinter 如何在 Microsoft Windows 上工作?
问题描述
我正在阅读 Tkinter 上有关 Windows 管理器处理的某些操作的文章,我想知道 Tkinter 究竟是如何与操作系统的窗口管理器通信的?根据文档,它使用 Xlib 来绘制图形,但它在 Microsoft Windows 上是如何工作的?Xlib 不是类似 Unix 的图形库,即 X11 吗?Tkinter 究竟是如何与 Windows 图形通信的?Windows 版本的 Python 是否可以访问 WinAPI 并且不使用 Xlib?
解决方案
Tk (the library upon which tkinter is base) uses the windows API on windows, and cocoa libraries on OSX. Those two platforms don't use xlib, though it is possible to compile X11-based versions on those platforms if you wish.
A lot of information about the windows port of tcl/tk is available on the Tcl wiki: https://wiki.tcl-lang.org/page/Microsoft+Windows+and+Tcl
推荐阅读
- java - “String @NotNull []”语法导致 intellij IDEA 插件中的“'@NotNull' 不适用于类型使用”
- mongodb - 如何只从 Mongodb 聚合中返回一些字段($project),同时还使用 $match、$lookup 和 $filter
- javascript - Nestjs / Jestjs:收到:未定义,预期:1
- java - 鉴于检查的错误不会在我的程序中抛出,这个未经检查的包装器是否可以接受
- javascript - 数组减少累加器为空数组,推送不起作用
- python - Pyexcelerate:设置表格样式格式
- html - 如何删除输入的边框
- python - 如何优化查询集过滤
- powershell - 如何使用 PowerShell 解密通过 SSE-C 方法上传的文件
- c - 在 Linux 中,进程如何调用 mmap() 并为其子进程添加 VMA?