SSH using PEXPECT

nntpman68 news1234 at free.fr
Sat Sep 13 11:29:22 CEST 2008


Hi,

yellowblueyellow at gmail.com wrote:
> On Sep 10, 7:01 pm, Sean DiZazzo <half.ital... at gmail.com> wrote:

> I am using windows and for reason it wont let me use pexpect even tho
> I have CYGWIN installed
> 
> 
> I get the following error
> 
> Traceback (most recent call last):
>   File "new.py", line 1, in <module>
>     import ssh_session
>   File "C:\Python25\lib\ssh_session.py", line 7, in <module>
>     from pexpect import *
>   File "C:\Python25\lib\site-packages\pexpect.py", line 85, in
> <module>
>     support it. Pexpect is intended for UNIX-like operating
> systems.""")
> ImportError: No module named resource
> 

You might have cygwin installed,
but the error mesage sems to indicatem that you don't use cygwin's 
pythonm but the normal windows python,

You see, that it complains about pexpcet in 
C:\Python25\lib\site-packages\pexpect.py



just open a cygwin window:

then cd to the directory containign your script and type
python new.py.

you should have at least another error message


bye

N



More information about the Python-list mailing list