我正在使用pexpect从linux主机上运行nano,我正在试图找到一种从pexpect获取信息的方法,这样我就可以在其他地方重新构建nano (或vi或任何终端应用程序)。所以就像这样:p.sendline('nano cheese')
#Get the tty information for the nano/vi/whatever UI#
我有一个非常简单的金字塔应用程序,它提供一个简单的静态页面。假设它的名称是mypyramid,并使用端口9999。因此,在我的另一个应用程序中,我使用pexpect启动mypyramid,然后尝试从http://localhost:9999/index.html获取html字符串。def _start_mypyramid():
p = pexpect.spawn(command='.urlopen('http://localho