Show More
@@ -21,6 +21,20 b" __author__ = '%s <%s>' % Release.authors['Ville']" | |||||
21 | __license__ = Release.license |
|
21 | __license__ = Release.license | |
22 |
|
22 | |||
23 | import sys |
|
23 | import sys | |
|
24 | import os | |||
24 |
|
25 | |||
25 | def set_term_title(title): |
|
26 | ||
|
27 | def _dummy_op(*a, **b): | |||
|
28 | """ A no-op function """ | |||
|
29 | ||||
|
30 | def _set_term_title_xterm(title): | |||
|
31 | """ Change virtual terminal title in xterm-workalikes """ | |||
26 | sys.stdout.write('\033]%d;%s\007' % (0,title)) |
|
32 | sys.stdout.write('\033]%d;%s\007' % (0,title)) | |
|
33 | ||||
|
34 | ||||
|
35 | if os.environ.get('TERM','') == 'xterm': | |||
|
36 | set_term_title = _set_term_title_xterm | |||
|
37 | else: | |||
|
38 | set_term_title = _dummy_op | |||
|
39 | ||||
|
40 |
General Comments 0
You need to be logged in to leave comments.
Login now