Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用 pexpect 模块将某个组合键传递给衍生/子进程?我正在使用 telnet 并且必须将 Ctrl+Z 传递给远程服务器。
肿瘤坏死因子
使用发送控制()
例如:
p = pexpect.spawn(your_cmd_here) p.sendcontrol('z')