MCPcopy Index your code
hub / github.com/python/cpython / stackorder

Method stackorder

Lib/idlelib/idle_test/test_config_key.py:123–135  ·  view source on GitHub ↗

Get the stack order of the children of the frame. winfo_children() stores the children in stack order, so this can be used to check whether a frame is above or below another one.

()

Source from the content-addressed store, hash-verified

121 dialog = self.dialog
122
123 def stackorder():
124 """Get the stack order of the children of the frame.
125
126 winfo_children() stores the children in stack order, so
127 this can be used to check whether a frame is above or
128 below another one.
129 """
130 for index, child in enumerate(dialog.winfo_children()):
131 if child._name == 'keyseq_basic':
132 basic = index
133 if child._name == 'keyseq_advanced':
134 advanced = index
135 return basic, advanced
136
137 # New window starts at basic level.
138 self.assertFalse(dialog.advanced)

Callers

nothing calls this directly

Calls 2

enumerateFunction · 0.85
winfo_childrenMethod · 0.80

Tested by

no test coverage detected