MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / __init__

Method __init__

tools/python-3.11.9-amd64/Lib/tkinter/tix.py:423–453  ·  view source on GitHub ↗
(self, master, name,
               destroy_physically=1, check_intermediate=1)

Source from the content-addressed store, hash-verified

421 of this)"""
422
423 def __init__(self, master, name,
424 destroy_physically=1, check_intermediate=1):
425 if check_intermediate:
426 path = master._subwidget_name(name)
427 try:
428 path = path[len(master._w)+1:]
429 plist = path.split('.')
430 except:
431 plist = []
432
433 if not check_intermediate:
434 # immediate descendant
435 TixWidget.__init__(self, master, None, None, {'name' : name})
436 else:
437 # Ensure that the intermediate widgets exist
438 parent = master
439 for i in range(len(plist) - 1):
440 n = '.'.join(plist[:i+1])
441 try:
442 w = master._nametowidget(n)
443 parent = w
444 except KeyError:
445 # Create the intermediate widget
446 parent = TixSubWidget(parent, plist[i],
447 destroy_physically=0,
448 check_intermediate=0)
449 # The Tk widget name is in plist, not in name
450 if plist:
451 name = plist[-1]
452 TixWidget.__init__(self, parent, None, None, {'name' : name})
453 self.destroy_physically = destroy_physically
454
455 def destroy(self):
456 # For some widgets e.g., a NoteBook, when we call destructors,

Callers

nothing calls this directly

Calls 5

TixSubWidgetClass · 0.85
_subwidget_nameMethod · 0.80
splitMethod · 0.45
__init__Method · 0.45
joinMethod · 0.45

Tested by

no test coverage detected