我必须在Linux机器上定期使用多个类似的应用程序,所以我想编写一个脚本来打开它们。你知道吗
你能帮我写一个脚本一次打开多个应用程序吗。你知道吗
示例:Firefox和Libre office cal
你能推荐一个能打开以上应用程序的脚本吗(Firefox和Libre office cal),这样我就可以定制脚本来打开多个应用程序了。你知道吗
脚本:
import os
import browser
from threading import Thread
def app1(my_app_name):
os.system(my_app_name)
def main():
t1 = Thread(target=app1, args=(('firefox',)) )
#t2 = Thread(target=app1 , args=(('libreoffice',)) )
t1.start()
#t2.start()
if __name__ == '__main__':
main()
也许有用:
我使用(os)来执行linux命令shell(也可以在windows中使用) 和线程以并行方式运行程序
相关问题 更多 >
编程相关推荐