Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我实际上正在开发一个 TACTIC 项目,该项目在前端使用 AngularJS,在后端使用 Python 脚本。在这里,当使用server.execute_cmd(cls_name,args)Javascript 代码执行 python 脚本时,python 脚本运行,但无法将值返回到前端!
server.execute_cmd(cls_name,args)
要将任何 o/p 返回给调用函数,您需要填充并返回self.info
self.info["your_key_here"] = [your_answer]
这样前端或者调用命令就会收到想要的返回值。我希望这个答案可以帮助其他曾经/或将来有类似查询的人。