Returns a widget from its ptype and pname

def _widget_from_p(self, pname, ptype):
        """Returns a widget from its ptype and pname"""

        widget_name = self.type2widget[ptype].__name__.lower()
        widget_name = "_".join([widget_name, pname])
        return getattr(self, widget_name)