MCPcopy Index your code
hub / github.com/ipython/ipython / _set_term_title_xterm

Function _set_term_title_xterm

IPython/utils/terminal.py:68–77  ·  view source on GitHub ↗

Change virtual terminal title in xterm-workalikes

(title)

Source from the content-addressed store, hash-verified

66
67
68def _set_term_title_xterm(title):
69 """ Change virtual terminal title in xterm-workalikes """
70 global _xterm_term_title_saved
71 # Only save the title the first time we set, otherwise restore will only
72 # go back one title (probably undoing a %cd title change).
73 if not _xterm_term_title_saved:
74 # save the current title to the xterm "stack"
75 sys.stdout.write("\033[22;0t")
76 _xterm_term_title_saved = True
77 sys.stdout.write('\033]0;%s\007' % title)
78
79
80def _restore_term_title_xterm():

Callers

nothing calls this directly

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…