def create_window(self, name, panes, post_cmds, layout=None):
        if len(self._windows) > 0:
            window, pane = self._tmux.new_window(self._name, name)
        else:
            self._session, window, pane = \
                self._tmux.new_session(self._name, name)
            if not self._session:
                print('Error creating session buddy.')
                sys.exit(1)

        session_name = self._session['name']
        window['panes'] = []
        for pane_schema in panes:
            if len(window['panes']) > 0:
                pane = self._tmux.new_pane(session_name, name, pane['index'])
            window['panes'].append(pane)

            # Run commands+post-commands, and activate virtualenv
            cmds = next(iter(pane_schema.values())) \
                if isinstance(pane_schema, dict) else [pane_schema]
            cmds = self._venv + cmds + post_cmds
            for cmd in cmds:
                self._tmux.send_keys(session_name, name, pane['index'], cmd)

        self._tmux.set_layout(session_name, name, layout)
        return window
Called when a network change is made that nova cares about.
dataset/ETHPy150Open rafi/mx/src/mx/workspace.py/Workspace.create_window--crossover with--dataset/ETHPy150Open openstack/neutron/neutron/notifiers/nova.py/Notifier.send_network_change