sugar-toolkit-gtk3/shell/view/devices/deviceview.py
2007-02-28 16:19:01 +01:00

12 lines
275 B
Python

from sugar.graphics.canvasicon import CanvasIcon
def create(model):
name = 'view.devices.' + model.get_type()
mod = __import__(name)
components = name.split('.')
for comp in components[1:]:
mod = getattr(mod, comp)
return mod.DeviceView(model)