From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Open terminal window in Call Executable

Hello,

 

I am begginer in TestStand.

I want to start some python script in "Call Executable" step.

In middle of execution in this script there is a confirmation prompt, which pauses the script untill user input something.

After ecexuting the script i need to catch it's stdout to make some further decisions. 

I have tried open script with "python.exe" and "scriptname.py" as an Argument Expression, or with "cmd.exe" as exec filename and "/c python scriptname.py" as an Argument Expression. 

 

The problem is: in both cases TestStand does not open terminal window while executing, so script just started silently on background and freezes when it should ask for user input. So all i can do is kill it manually with process manager.

I have tried to use powershell instead of cmd and it works the same.

I have tried to start script with "cmd.exe" and "/c start python scriptname.py" command as Argument Expression, and it opens terminal window and user input prompt is works, but then TestStand can't catch stdout of the script because python proccess opens in different window/process, so returned stdout of parent process is just empty string.

 

Am i miss something and how i can do this?

 

Thank you.

0 Kudos
Message 1 of 2
(2,099 Views)

Hello stappa

 

Can you share the code or at least the section that is giving trouble?

0 Kudos
Message 2 of 2
(2,072 Views)