def callfunc(self, name, *args, **optargs): """Call skill function in session""" skillobject = skill.SkillObject(self) skillobject.eval("(%s " % name + " ".join( map(skill.toSkill, args) + ["?%s %s" % (k, skill.toSkill(v)) for k, v in optargs.items()]) + ")") return skillobject
def evalexpr(self, expr, *args): """Eval skill-expression with optional SkillObjects arguments expanded SkillObjects can be used in the expression by using %s and supplying the SkillObjects to be expanded in the args argument """ skillobject = skill.SkillObject(self) skillobject.eval(expr % tuple(arg.varname for arg in args)) return skillobject