Can I use Expect on Windows without installing Cygwin?

后端 未结 6 1939
-上瘾入骨i
-上瘾入骨i 2020-12-05 20:15

Expect is a module used for spawning child applications and controlling them. I\'m interested in Python and Ruby.

6条回答
  •  星月不相逢
    2020-12-05 20:40

    You can use the Windows CMD prompt.

    You need to have Python installed in your Windows installation.

    Open a cmd prompt and execute the below command:

    C:\Users\xxx>pip install pexpect (if you have set the Python path in a system variable)

    or

    C:\Users\xxx>c:\python27\scripts\pip.exe install pexpect
    
    Collecting pexpect
      Downloading pexpect-4.0.1.tar.gz (143kB)
        100% |################################| 147kB 1.2MB/s
    Collecting ptyprocess>=0.5 (from pexpect)
      Downloading ptyprocess-0.5.1-py2.py3-none-any.whl
    Building wheels for collected packages: pexpect
      Running setup.py bdist_wheel for pexpect
      Stored in directory: C:\Users\xxx\AppData\Local\pip\Cache\wheels\f2\65\89\09578bcd0efeabc7e2b0079cd62d3955c1477f2e55aa5031a4
    Successfully built pexpect
    Installing collected packages: ptyprocess, pexpect
    Successfully installed pexpect-4.0.1 ptyprocess-0.5.1
    

提交回复
热议问题