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

Method geticonimage

Lib/idlelib/tree.py:104–114  ·  view source on GitHub ↗
(self, name)

Source from the content-addressed store, hash-verified

102 self.parent = None
103
104 def geticonimage(self, name):
105 try:
106 return self.iconimages[name]
107 except KeyError:
108 pass
109 file, ext = os.path.splitext(name)
110 ext = ext or ".gif"
111 fullname = os.path.join(ICONDIR, file + ext)
112 image = PhotoImage(master=self.canvas, file=fullname)
113 self.iconimages[name] = image
114 return image
115
116 def select(self, event=None):
117 if self.selected:

Callers 2

drawMethod · 0.95
drawiconMethod · 0.95

Calls 3

PhotoImageClass · 0.85
splitextMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected