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

Method save_new

Lib/idlelib/configdialog.py:1048–1057  ·  view source on GitHub ↗

Save a newly created theme to idleConf. theme_name - string, the name of the new theme theme - dictionary containing the new theme

(self, theme_name, theme)

Source from the content-addressed store, hash-verified

1046 self.set_color_sample()
1047
1048 def save_new(self, theme_name, theme):
1049 """Save a newly created theme to idleConf.
1050
1051 theme_name - string, the name of the new theme
1052 theme - dictionary containing the new theme
1053 """
1054 idleConf.userCfg['highlight'].AddSection(theme_name)
1055 for element in theme:
1056 value = theme[element]
1057 idleConf.userCfg['highlight'].SetOption(theme_name, element, value)
1058
1059 def askyesno(self, *args, **kwargs):
1060 # Make testing easier. Could change implementation.

Callers 1

create_newMethod · 0.95

Calls 2

AddSectionMethod · 0.80
SetOptionMethod · 0.45

Tested by

no test coverage detected