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

Method __init__

Lib/idlelib/config_key.py:49–74  ·  view source on GitHub ↗

parent - parent of this dialog action - the name of the virtual event these keys will be mapped to current_key_sequences - a list of all key sequence lists currently mapped to virtual events, for overlap checking

(self, parent, action, current_key_sequences)

Source from the content-addressed store, hash-verified

47 keyerror_title = 'Key Sequence Error'
48
49 def __init__(self, parent, action, current_key_sequences):
50 """
51 parent - parent of this dialog
52 action - the name of the virtual event these keys will be
53 mapped to
54 current_key_sequences - a list of all key sequence lists
55 currently mapped to virtual events, for overlap checking
56 """
57 super().__init__(parent)
58 self['borderwidth'] = 2
59 self['relief'] = 'sunken'
60 self.parent = parent
61 self.action = action
62 self.current_key_sequences = current_key_sequences
63 self.result = ''
64 self.key_string = StringVar(self)
65 self.key_string.set('')
66 # Set self.modifiers, self.modifier_label.
67 self.set_modifiers_for_platform()
68 self.modifier_vars = []
69 for modifier in self.modifiers:
70 variable = StringVar(self)
71 variable.set('')
72 self.modifier_vars.append(variable)
73 self.advanced = False
74 self.create_widgets()
75
76 def showerror(self, *args, **kwargs):
77 # Make testing easier. Replace in #30751.

Callers 1

__init__Method · 0.45

Calls 6

create_widgetsMethod · 0.95
StringVarClass · 0.90
superClass · 0.85
setMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected