Control whether set_term_title is active or not. set_term_title() allows writing to the console titlebar. In embedded widgets this can cause problems, so this call can be used to toggle it on or off as needed. The default state of the module is for the function to be disabled.
(val)
| 35 | |
| 36 | |
| 37 | def toggle_set_term_title(val): |
| 38 | """Control whether set_term_title is active or not. |
| 39 | |
| 40 | set_term_title() allows writing to the console titlebar. In embedded |
| 41 | widgets this can cause problems, so this call can be used to toggle it on |
| 42 | or off as needed. |
| 43 | |
| 44 | The default state of the module is for the function to be disabled. |
| 45 | |
| 46 | Parameters |
| 47 | ---------- |
| 48 | val : bool |
| 49 | If True, set_term_title() actually writes to the terminal (using the |
| 50 | appropriate platform-specific module). If False, it is a no-op. |
| 51 | """ |
| 52 | global ignore_termtitle |
| 53 | ignore_termtitle = not(val) |
| 54 | |
| 55 | |
| 56 | def _set_term_title(*args,**kw): |