坚持Pexpect脚本需要帮助!!

使用python准备好了ssh到unix的代码主机现在是windows,当我运行它时,它给出了以下错误:

选择 | 换行 | 行号
  1. Traceback (most recent call last):
  2.   File "C:\Python26\pexpect-2.1\pexpect-2.1\pxssh.py", line 1, in <module>
  3.     from pexpect import *
  4.   File "C:\Python26\pexpect-2.1\pexpect-2.1\pexpect.py", line 83, in <module>
  5.     Pexpect is intended for UNIX-like operating systems.""")
  6. ImportError: No module named resource
  7. A critical module was not found. Probably this operating system does not support it.
  8. Pexpect is intended for UNIX-like operating systems.
  9. >>> ================================ RESTART ================================
  10. >>> 
  11.  
  12. Traceback (most recent call last):
  13.   File "C:\Python26\ssh_session.py", line 7, in <module>
  14.     from pexpect import *
  15. ImportError: No module named pexpect
  16. >>> 

我们可以使用windows主机上的pexpect吗?!

# 回答1

知道pexpect只支持基于unix的机器

标签: python

添加新评论