Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-08-2019, 03:50 AM
solari solari is offline
Registered User
 
Join Date: Feb 2019
Posts: 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
Reply With Quote
  #2  
Old 02-08-2019, 08:34 AM
ekoranyi ekoranyi is offline
VanDyke Technical Support
 
Join Date: Jan 2017
Posts: 654
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
Reply With Quote
  #3  
Old 02-08-2019, 06:01 PM
vanvinh vanvinh is offline
Registered User
 
Join Date: Feb 2019
Posts: 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!
Reply With Quote
  #4  
Old 02-08-2019, 06:21 PM
vanvinh vanvinh is offline
Registered User
 
Join Date: Feb 2019
Posts: 3
you may need to look into subprocess library. There is a way to execute bash comaand on secureCRt
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 07:54 PM.