我的shell脚本编写的Python GUI

时间:2017-04-26 15:32:15

标签: python shell user-interface scripting

我写了一些简单的Linux shell脚本。现在我想弄清楚的是,我可以使用python开发GUI并从GUI触发我的shell脚本。 这可能吗。我怎样才能做到这一点。请提出任何想法或例子。
谢谢。

1 个答案:

答案 0 :(得分:1)

只需确保python可执行文件位于PATH环境变量中,然后在脚本中添加

python path / to / the / python_script.py 详细说明:

在文件job.sh中,放置

!/ bin / sh的

python python_script.py

执行此命令使脚本可以为您运行:chmod u + x job.sh 运行它:./ job.sh