是否可以在Python制作的GUI中使用批处理脚本?

发布于 2024-10-07 17:12:18 字数 124 浏览 0 评论 0原文

我想知道是否可以用 python 编写一个 GUI,然后在 python 脚本中的某个位置插入一个脚本开关来临时更改语言以适应批处理片段。

我知道这可以用 html 和 vbscript 完成,但是 Python 呢?

I was wondering if it was possible to write a GUI in python, and then somewhere in the python script, insert a script switch to temporarily change the language to accomodate for the batch snippet.

I know this can be done in html and vbscript but what about Python?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

情深已缘浅 2024-10-14 17:12:18

您可以使用 subprocess 模块控制用任何语言编写的其他进程,包括 bash。

You can control other processes, written with any language, including bash using the subprocess module.

负佳期 2024-10-14 17:12:18

subprocess 模块是执行其他进程的最强大、最完整的方法。不过,还有一个非常简单的方法,使用 os 模块:os.system(command) 运行 command 就像在命令行中输入它一样。

The subprocess module is the most powerful and complete method for executing other processes. However, there's also a very simple method using the os module: os.system(command) runs command just as if you were to type it into a command line.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文