是否可以在Python制作的GUI中使用批处理脚本?
我想知道是否可以用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用 subprocess 模块控制用任何语言编写的其他进程,包括 bash。
You can control other processes, written with any language, including bash using the subprocess module.
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)
runscommand
just as if you were to type it into a command line.