{!info!} 和 {!input!} 在此 python 代码中做了什么?
s += " {!info!}Down Speed: {!input!}%s" % common.fspeed(status["download_payload_rate"])
取自:http://git.deluge-torrent.org/deluge/tree/deluge/ui/console/commands/info.py?h=1.3-stable
谢谢。
最佳答案
它们对 Python 没有任何意义。字符串 s
将逐字包含 {!info!}
和 {!input!}
。但是,该字符串后来由 Deluge 本身解释以进行颜色格式化 — 参见 ui/console/colors.py ,特别是 parse_color_string
。
关于python - Python 中的 {!text!} 是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17204864/