title: Changing tmux window name using Python
body: <p>Is there a way to change the <code>tmux</code> window title from python. I am using <code>fabric</code> to automate the deployment of long-running jobs, so I can run the jobs in the detached mode in <code>tmux</code>. (it may not be <code>fabric</code> related question, but I think people who have used fabric might have come across this problem) I understand that something like below can be used to create a new session and run commands in those sessions. </p>
  
  <pre><code>with Connection("ip") as cxn:
      cxn.run("tmux new -d -s session_name")
      cxn.run("tmux send -t session_name.0 ls ENTER")
  </code></pre>
  
  <p>Is there a way to create a new window with a specific title and call it like this:</p>
  
  <pre><code>with Connection("ip") as cxn:
    if cxn.run("tmux has -t session_name", warn=True, hide="err").exited != 0:
       cxn.run("tmux new -d -s session_name")
    cxn.run("tmux new -d -s session_name -n windown_name")
    cxn.run("tmux send -t session_name.window_name ls ENTER")
  </code></pre>