Exemple #1
0
 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
Exemple #2
0
	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