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

Method save_new_key_set

Lib/idlelib/configdialog.py:1491–1504  ·  view source on GitHub ↗

Save a newly created core key set. Add keyset to idleConf.userCfg['keys'], not to disk. If the keyset doesn't exist, it is created. The binding/keys are taken from the keyset argument. keyset_name - string, the name of the new key set keyset - dictionary co

(keyset_name, keyset)

Source from the content-addressed store, hash-verified

1489
1490 @staticmethod
1491 def save_new_key_set(keyset_name, keyset):
1492 """Save a newly created core key set.
1493
1494 Add keyset to idleConf.userCfg['keys'], not to disk.
1495 If the keyset doesn't exist, it is created. The
1496 binding/keys are taken from the keyset argument.
1497
1498 keyset_name - string, the name of the new key set
1499 keyset - dictionary containing the new keybindings
1500 """
1501 idleConf.userCfg['keys'].AddSection(keyset_name)
1502 for event in keyset:
1503 value = keyset[event]
1504 idleConf.userCfg['keys'].SetOption(keyset_name, event, value)
1505
1506 def askyesno(self, *args, **kwargs):
1507 # Make testing easier. Could change implementation.

Callers 1

create_new_key_setMethod · 0.95

Calls 2

AddSectionMethod · 0.80
SetOptionMethod · 0.45

Tested by

no test coverage detected