简体   繁体   English

在哪里可以找到_tkinter模块的源代码?

[英]Where can I find the source code for the _tkinter module?

According to the Python 3 documentation, Chapter 25.1: tkinter - Python interface to Tcl/Tk : 根据Python 3文档的第25.1章: tkinter-Tcl / Tk的Python接口

The Tk interface is located in a binary module named _tkinter . Tk接口位于名为_tkinter的二进制模块中。 This module contains the low-level interface to Tk 该模块包含到Tk的低级接口

Where can I obtain the source code of this module? 在哪里可以获取此模块的源代码?

I checked python/cython on GitHub, but could not find it. 我在GitHub上检查了python/cython ,但找不到它。

发现它这里在GitHub上的CPython的

Check also this answer here which is related to your problem and gives this source ( https://hg.python.org/cpython/file/3.6/ ) from python.org. 在此处也检查与您的问题有关的答案 ,并从python.org提供此源( https://hg.python.org/cpython/file/3.6/ )。

How did I get there? 我怎么到那里? In python, 在python中,

>>> import _tkinter
>>> _tkinter.__file__
'/usr/lib/python2.7/lib-dynload/_tkinter.so'

Then in Google: "Python lib-dynload source". 然后在Google中:“ Python lib-dynload源”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM