Created
July 17, 2011 06:43
-
-
Save sli/1087288 to your computer and use it in GitHub Desktop.
Python function to set the title of a terminal window.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
def set_title(text): | |
sys.stdout.write('\x1b]2;%s\x07' % text) | |
if __name__ == '__main__': | |
set_title(sys.argv[1]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment