MCPcopy Create free account
hub / github.com/ActiveState/code / do_config

Function do_config

recipes/Python/498151_Example_For_winreg_2/recipe-498151.py:246–266  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

244# CONFIGURATION
245
246def do_config():
247## options = cPickle.load(file('shell.ini', 'rb'))
248## media.config(background=options[0])
249## for item in options[1:]:
250## name = item[0]
251## coords = item[1]
252## image = PhotoImage(file=name)
253## reference[media.create_image(coords, image=image)] = image
254## if len(item) == 3:
255## image.shortcut = item[2]
256 option = Key(key=HKEY.CURRENT_USER, sub_key='Software\\Atlantis Zero\\Demo Shell\\winreg').values
257 media.config(background=option['background'].value)
258 for name in option:
259 if name != 'background':
260 item = cPickle.loads(option[name].value)
261 name = item[0]
262 coords = item[1]
263 image = PhotoImage(file=name)
264 reference[media.create_image(coords, image=image)] = image
265 if len(item) == 3:
266 image.shortcut = item[2]
267
268def do_setup():
269 if len(sys.argv) > 1 and sys.argv[1] == 'random':

Callers 1

recipe-498151.pyFile · 0.85

Calls 3

PhotoImageClass · 0.85
KeyClass · 0.50
loadsMethod · 0.45

Tested by

no test coverage detected