Python setting lib and pexpect

Amol Sonaikar amol at kenati.com
Mon Jan 6 08:02:29 CET 2003


Hi

I have python 1.5 and 2.1 installed on my RH linux box. I have downloaded a 
tool called PEXPECT (pexpect.sourceforge.net) and trying out a program in it 
(sshls.py) but when I untar the tgz file it seems it is copying the file in 
Python1.5 lib. Because in the example the env is set to #!/usr/bin/env python

The file imports librar named pexpect. If I change the env to python2.1 (this 
is what I done in my other examples, it gives following is error

Traceback (most recent call last):
  File "./sshls.py", line 5, in ?
    import pexpect
ImportError: No module named pexpect

How should I set the default library to 2.1 rather than 1.5

Amol





More information about the Python-list mailing list