def import_robot(robot_name):
- exec("from Robots import bkmk_r%s" % robot_name)
- exec("robot = bkmk_r%s.robot_%s" % (robot_name, robot_name))
- return robot
+ ns = locals()
+ exec("from Robots import bkmk_r%s" % robot_name, globals(), ns)
+ exec("robot = bkmk_r%s.robot_%s" % (robot_name, robot_name), globals(), ns)
+ return ns['robot']
robot = import_robot(robot_name)