gpt4 book ai didi

python - 有没有办法为 bash 脚本提供 GUI?

转载 作者:太空宇宙 更新时间:2023-11-03 13:24:13 24 4
gpt4 key购买 nike

我有一些 bash 脚本,一些用于复制、搜索、向文件写入行等的简单脚本。

我是 Ubuntu。我在谷歌搜索过,但似乎每个人都在 python 上这样做。我可以在 python 上完成这些,但由于我不是 python 程序员,我只知道基础知识。我不知道如何从用 python 编写的 GUI 调用 sh 脚本。

如果有人有链接或有话要说,请留言。

问候,马里奥

最佳答案

Is there a way of having a GUI for bash scripts?

您可以尝试使用 Zenity .

a tool that allows you to display GTK dialog boxes in commandline and shell scripts.


I have no idea of how calling a sh script from a GUI written on python.

您可以使用 subprocess 执行此操作.

我个人建议您学习 Python 并从 Python 调用脚本,而不是尝试在 Bash 中编写 GUI。

关于python - 有没有办法为 bash 脚本提供 GUI?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3556027/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com