【发布时间】:2016-06-26 14:13:31
【问题描述】:
我正在编写一个脚本,它将在我的终端中打开 tmux 并拆分窗口。为此,我需要将 tmux、Ctrl + b 和 % 发送到终端。
def make_win():
subprocess.call('tmux', shell=True)
subprocess.call('Ctrl', 'b', shell=True)
subprocess.call('%', shell=True)
“Ctrl”和“b”键需要同时按住/单击。
【问题讨论】:
标签: python subprocess