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

Function do_setup

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

Source from the content-addressed store, hash-verified

266 image.shortcut = item[2]
267
268def do_setup():
269 if len(sys.argv) > 1 and sys.argv[1] == 'random':
270 do_random = True
271 else:
272 do_random = False
273 if do_random:
274 media.config(background='#ffffff')
275 else:
276 media.config(background='#00007f')
277 names = files()
278 random.shuffle(names)
279 for name in names:
280 if name.lower().endswith('default.gif'):
281 calibrate = name
282 elif name.lower().endswith('.gif') and do_random:
283 image = PhotoImage(file=name)
284 put(media, image, random.random(), random.random())
285 for x in range(2):
286 for y in range(2):
287 media.tag_lower(put(media, PhotoImage(file=calibrate), x, y))
288
289##if os.path.exists('shell.ini'):
290try:

Callers 1

recipe-498151.pyFile · 0.85

Calls 8

PhotoImageClass · 0.85
rangeFunction · 0.85
endswithMethod · 0.80
filesFunction · 0.70
putFunction · 0.70
shuffleMethod · 0.45
lowerMethod · 0.45
randomMethod · 0.45

Tested by

no test coverage detected