Expect是一个用于生成子应用程序并控制它们的模块.我对Python和Ruby感兴趣.
解决方法:
wexpect.py文件中的注释(拼写错误并突出显示已添加)
Wexpect is a port of pexpext to Windows. Since python for Windows lacks
the requisite modules (pty, tty, select, termios, fctnl, and resource) to run
pexpect, it was necessary to create a back-end that implemented any functions
that were used that relied on these modules. Wtty.py is this back-end. In
the Windows world consoles are not homogeneous. They can use low level or high
level input and output functions, and to correctly deal with both cases two
child processes are created for instacne of Spawn, with an intermidate child
that can continuously read from the console, and send that data over a pipe
to an instance of wtty. Spawner.py is resposible from reading and piping
data.I’ve left as much code intact as I Could and also tried to leave as many comments
intact is possible (espicially for functions that have not been changed) so many
of the comments will be misleading in their relationship to os specific
functionality. Also, the functions sendcontrol and sendeof are unimplemnted at
this time, as I Could not find meaningful Windows versions of these functions.
additionally, consoles do not have associated fild descriptors on Windows, so the
global variable child_fd will always be None.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。