2024-09-30 00:41:37 发布
网友
我正试图用vim和来自Replace visual selection的advision翻译文本。但当我调用system('ru2uk', getreg('"'))(通过系统参数传输的参数)时,python脚本不会通过txt=' '.join(sys.argv[1:])接收参数。串联工作,代码:system('ru2uk ' . getreg('"'))
system('ru2uk', getreg('"'))
txt=' '.join(sys.argv[1:])
system('ru2uk ' . getreg('"'))
从:h system()
:h system()
When {input} is given and is a string this string is written to a file and passed as stdin to the command.
所以system()的第二个参数不是“命令行参数”,而是stdin数据。而且必须妥善处理
system()
从
:h system()
所以
system()
的第二个参数不是“命令行参数”,而是stdin数据。而且必须妥善处理相关问题 更多 >
编程相关推荐