python - 神秘的 "1;3409;0c"行从何而来

标签 python string character

我在我的代码中发现了我从未写过的一行:

#!/usr/bin/python
#1;3409;0c

from math import exp

我想你可以自己发现。

所以我用谷歌搜索了一下,似乎没有人谈论它,但是,它在某些地方会自行出现:

有人知道它是从哪里来的吗?

最佳答案

根据 Why is vim starting in delete mode? 上的评论,这似乎与 Vim 和终端之间的交互有关

When built with the +termresponse feature, Vim sends a special control sequence (see :set t_RV?) to the terminal. When your terminal emulator see this sequence it responds with the sequence ESC ]>1;3201;0c.

根据 Mapping <esc> in vimrc causes bizzare arrow behaviour,在这些情况下按下退出键时,Vim 可能还会做一些事情。

This ensures that the binding doesn't happen until after the term response is set, which prevents Esc from also sending a string like ]>1;3201;0c to vim.

因此,我猜测问题中链接的所有页面都已(至少一次)在 Vim 中打开。

关于python - 神秘的 "1;3409;0c"行从何而来,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27861186/

相关文章:

python - 部署 Orange 3 模型

c# - Stringbuilder 从多个数组追加表单

python - 旧的 python 散列从左到右完成——为什么不好?

javascript - JQuery Popup 字符映射

python - 将字典值导入到 Python 中的 OptionMenu 中

python - 从使用 matplotlib 生成的 delaunay 三角剖分获取外心

php - 在没有 Eval 的情况下在字符串中执行 PHP 代码

java - 在 java 中,使用 stringName.contains() 不适用于特殊字符代码

c++ - 什么假设对于 C++ 实现的字符集是安全的?

python - 我需要为一个简单的网站使用网络框架吗?