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

Method GetExtnNameForEvent

Lib/idlelib/config.py:458–470  ·  view source on GitHub ↗

Return the name of the extension binding virtualEvent, or None. virtualEvent - string, name of the virtual event to test for, without the enclosing '<< >>'

(self, virtualEvent)

Source from the content-addressed store, hash-verified

456 return [n for n in extnNameList if not n.endswith(('_bindings', '_cfgBindings'))]
457
458 def GetExtnNameForEvent(self, virtualEvent):
459 """Return the name of the extension binding virtualEvent, or None.
460
461 virtualEvent - string, name of the virtual event to test for,
462 without the enclosing '<< >>'
463 """
464 extName = None
465 vEvent = '<<' + virtualEvent + '>>'
466 for extn in self.GetExtensions(active_only=0):
467 for event in self.GetExtensionKeys(extn):
468 if event == vEvent:
469 extName = extn # TODO return here?
470 return extName
471
472 def GetExtensionKeys(self, extensionName):
473 """Return dict: {configurable extensionName event : active keybinding}.

Callers 2

Calls 2

GetExtensionsMethod · 0.95
GetExtensionKeysMethod · 0.95

Tested by 1