|
![]() |
|
Thread Tools | Rate Thread | Display Modes |
#1
|
|||
|
|||
python scripting - calling another python script / windows cmd.exe
Hi All,
How can I call another python script from a SecureCRT python script and return? Alternatively, calling windows cmd.exe with arguments could solve the problem. If anyone could provide examples for any of the two mentioned issues, that would be great. Thank you in advance! solari |
#2
|
|||
|
|||
Hi solari,
To the best of my knowledge, there presently is not a way to run one script from another in SecureCRT. I have added this thread to a feature request in our product enhancement database to add the ability to run multiple scripts in succession (call one script from another). Should a future release of SecureCRT include this feature, notification will be posted here. If you prefer direct email notification, send an email to Support@VanDyke.com and include "Feature Request - Forum Thread #13395" in the subject line or use this form from the support page of our website. In the meantime can you tell me a little more about your needs? I would like to see if we can suggest an alternative solution. What problem is it that you're trying to solve?
__________________
Thanks, --Eric VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#3
|
|||
|
|||
hi, I had been using secureCRT to run external python file and here is how:
subprocess.Popen(["py", '-3.5', "get_OTP.py"], stdout=subprocess.PIPE).communicate()[0] in which get_OTP is my python script. Hope it help! |
#4
|
|||
|
|||
you may need to look into subprocess library. There is a way to execute bash comaand on secureCRt
|
![]() |
Thread Tools | |
Display Modes | Rate This Thread |
|
|