I'm trying to make a script that will open up tmux and then split the screens and open up a few python instances but it will ony run the first command.
k = PyKeyboard()
def cntrl_b(key):
k.press_key('Control_L')
k.tap_key('b')
k.release_key('Control_L')
k.tap_key(key)
def make_win():
subprocess.call('tmux')
subprocess.call(cntrl_b('%'))
subprocess.call('clear')
subprocess.call('"')
subprocess.call('clear')
subprocess.call('ipython')
subprocess.call(cntrl_b('o'))
subprocess.call('bpython')
if __name__=='__main__':
make_win()
I'm calling 'clear' because I'm using powerline and I get error messages when I open tmux.
I've tested each command individually and they each work.
This code will just open tmux and not do any of the other commands.