Mercurial > code > home > repos > light9
diff bin/run_local.py @ 933:8435e3ee1ec2
put program name in terminal title
Ignore-this: dc97077b95fe4d23527c1ea08e3fe7c1
author | drewp@bigasterisk.com |
---|---|
date | Wed, 12 Jun 2013 05:01:02 +0000 |
parents | 167a61d3cfbf |
children | f92550d33004 |
line wrap: on
line diff
--- a/bin/run_local.py Wed Jun 12 04:48:26 2013 +0000 +++ b/bin/run_local.py Wed Jun 12 05:01:02 2013 +0000 @@ -30,4 +30,8 @@ log.addHandler(CSH(show_hostname=False, show_name=True)) +def setTerminalTitle(s): + if os.environ.get('TERM', '') in ['xterm']: + print "\033]0;%s\007" % s # not escaped/protected correctly +setTerminalTitle(sys.argv[0])