Add exec_py function specifically for factoids module (and possibly later use.)