module '_tkinter' has no attribute 'tkapp'

我对self.tk.call感到好奇,于是写了一个返回self.tk和self.tk.call的方法.

import tkinter as tk
class TEST(tk.Button):
	def _TKOBJ(self):
		return self.tk
	def _TKCALLOBJ(self):
		return self.tk.call

结果

>>> t = _t.TEST()
>>> t._TKCALLOBJ()
<built-in method call of _tkinter.tkapp object at 0x0000000002BBB6B0>
>>> t._TKOBJ()
<_tkinter.tkapp object at 0x0000000002BBB6B0>
>>> _tk.tkapp
Traceback (most recent call last):
  File "<pyshell#34>", line 1, in <module>
    _tk.tkapp
AttributeError: module '_tkinter' has no attribute 'tkapp'
>>> _tk.tkapp.call
Traceback (most recent call last):
  File "<pyshell#35>", line 1, in <module>
    _tk.tkapp.call
AttributeError: module '_tkinter' has no attribute 'tkapp'
>>> _tk.call
Traceback (most recent call last):
  File "<pyshell#36>", line 1, in <module>
    _tk.call
AttributeError: module '_tkinter' has no attribute 'call'

为什么?

tkinter_init_.py 2261行
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)

'_tkinter' 没有tkapp , 'call' 这属性