【发布时间】:2019-01-02 10:26:25
【问题描述】:
我想在 libreoffice 上创建一个 python 宏,它将触发另一个 python 脚本。不幸的是,它不起作用,我不知道为什么。
当我从终端启动 python 时,它可以正常工作,但不能从宏启动。
我的 macro.py 文件:
import os
def launch():
os.system("python /home/ivq/Documents/generation.py")
launch()
预期结果:启动 generation.py
实际结果:什么都没发生
【问题讨论】:
-
你怎么知道它没有启动?
标签: python macros libreoffice