Can i use pexpect module without installing if i dont have permission to install.
like using some limited functionality as below.
import pexpect
pexpect.spawn,
pexpect.spawn.expect
pexpect.spawn.sendline etc
modules
- is there any dependency that would need to be resolved,if so how do i check for any such dependency.
- where do i place the pexpect.py code to make it work.
how can i do it if possible.
UPDATE The following worked when this answer was originally written (January 2013), but it is no longer true for newer versions of pexpect.
Quoting from the INSTALL file that you’ll find in the source code of the package:
If you do not have root access or
if you do not wish to install Pexpect so that is available to any script
then you can just copy the pexpect.py file to same directory as your script.
So grab the source code, and copy
pexpect.pyto any directory in your Python path.