Issue #13 new

Not able to run winpexpect on windows 7

Anonymous created an issue

I have downloaded and installed winpexpect module on python2.7. Now when i try to run any command, it doesn't gets executed.

import pexpect'ls ') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Python27\lib\site-packages\winpexpect-1.5-py2.7.egg\", line 219, in run child = spawn(command, maxread=2000, logfile=logfile, cwd=cwd, env=env) File "C:\Python27\lib\site-packages\winpexpect-1.5-py2.7.egg\", line 429, in init self._spawn (command, args) File "C:\Python27\lib\site-packages\winpexpect-1.5-py2.7.egg\", line 516, in _spawn raise ExceptionPexpect ('The command was not found or was not executable: %s .' % self.command) pexpect.ExceptionPexpect: The command was not found or was not executable: ls.

I even tried running test cases available within source code, it reported three test case failures.

Comments (1)

  1. Kelvin You

    First, "ls" is not a windows command, and even you're using the windows command "dir". it doens't work yet, because "dir" is an internal command of "cmd.exe". The second, you should use "winpexpect", not "pexpect". The last, the winpexpect currently has not supported the "run" method.

    You can use the forked winpexpect:

  2. Log in to comment