通过Python更改Konsole标题 [英] Change Konsole title via Python

查看:131
本文介绍了通过Python更改Konsole标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Python中更改Konsole标题?
我发现这个代码:

How can I change the Konsole title in Python? I found this code:

>>> import sys
>>> sys.stdout.write("\x1b]2;test\x07")

推荐答案

我会给予\ x1b] 0; test\x07尝试(注意 0 而不是 2 )。

I would give "\x1b]0;test\x07" a try (note the 0 instead of 2).

打开bug 关于Konsole没有正确处理xterm转义序列;也许它不会工作,直到它被修复。

There is an open bug about Konsole not correctly treating xterm escape sequences; maybe it won't work at all until it is fixed.

这篇关于通过Python更改Konsole标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆