#1
|
|||
|
|||
pexpect with SecureCRT
Hello, I have many scripts in pexpect. At work we use SecureCRT and I need to run these scripts in it.
Please advice me how to import the pexpect library into SecureCRT. Thanks |
#2
|
|||
|
|||
Hello morgun,
My understanding is that pexpect is a Python module. You can run Python scripts in SecureCRT. What version of SecureCRT are you using? On what platform?
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#3
|
|||
|
|||
Hello I am using version 7.2.3 on Windows. And yes it is Python module, which combines python and expect.
|
#4
|
|||
|
|||
Hello morgun,
My understanding is there is not a native Pexpect module for Windows. Do you have Cygwin installed on your Windows OS?
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#5
|
|||
|
|||
Hello, yes I have cygwin installed.
I have admin right so please feel free to put here the whole procedure how to make it work. I can install necessary modules, tools as needed. Thanks |
#6
|
|||
|
|||
Hello morgun,
You will need to install pexpect and then include an "import module" line in your Python script (ie: import pexpect). That is the extent that SecureCRT is involved.
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#7
|
|||
|
|||
Actually, since pexpect is a pure python module no extra software is needed.
Download the latest pexpect code from github (https://github.com/pexpect/pexpect/archive/master.zip), unpack it somewhere and copy the pexpect folder inside to the same folder that your script is in. That's the pexpect folder on the same level as the doc, examples, test, notes etc folders. With that done, you can just Code:
import pexpect |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | Rate This Thread |
|
|