MCPcopy Index your code
hub / github.com/RustPython/RustPython / __init__

Method __init__

Lib/tkinter/__init__.py:4223–4237  ·  view source on GitHub ↗
(self, imgtype, name=None, cnf={}, master=None, **kw)

Source from the content-addressed store, hash-verified

4221 _last_id = 0
4222
4223 def __init__(self, imgtype, name=None, cnf={}, master=None, **kw):
4224 self.name = None
4225 if master is None:
4226 master = _get_default_root('create image')
4227 self.tk = getattr(master, 'tk', master)
4228 if not name:
4229 Image._last_id += 1
4230 name = "pyimage%r" % (Image._last_id,) # tk itself would use image<x>
4231 if kw and cnf: cnf = _cnfmerge((cnf, kw))
4232 elif kw: cnf = kw
4233 options = ()
4234 for k, v in cnf.items():
4235 options = options + ('-'+k, v)
4236 self.tk.call(('image', 'create', imgtype, name,) + options)
4237 self.name = name
4238
4239 def __str__(self): return self.name
4240

Callers

nothing calls this directly

Calls 5

_get_default_rootFunction · 0.85
getattrFunction · 0.85
_cnfmergeFunction · 0.85
itemsMethod · 0.45
callMethod · 0.45

Tested by

no test coverage detected