我想为交互式CLI程序(Asterisk CLI)编写一个包装器.
基本上,我需要保持与CLI的交互(包括tab-completion),但我想过滤Asterisk的输出,以便只显示与给定模式匹配的行.
我尝试了一种基于select()的方法,使用popen.popen4并在read_fs中放入asterisk stdout_and_stderr和sys.stdin,但它有点不起作用.
谁能给我一些好的指示?
非常感谢,安德里亚
python select interactive command-line-interface wrapper
command-line-interface ×1
interactive ×1
python ×1
select ×1
wrapper ×1