Quantcast
Channel: NI TestStand topics
Viewing all articles
Browse latest Browse all 6524

Tourbleshooting passing arguments to scripts

$
0
0

Hi,

 

I am new to TestStand and have been through the tutorials and some white papers, but I have run into a problem.

 

I have inherited a production script that uses Python scripts. Currently there is a workaround to run and load results from Python scripts into TestStand, but I have read that this is not required here: http://www.ni.com/tutorial/8847/en/#toc5 . Following the instructions, I am able to run scripts and parse outputs. However, I am having trouble with "Passing Data to Scripts from TestStand: Command Line". Any values in the Argument Expression of the Call Settings of the Call Executable step that calls the Python script directly do not get passed to the script. if I call it directly. E.g. if I call the script as follows:

File Pathname: sum.py

Argument Expression: "2 5 8"

 

Then the script is run, but the arguments 2, 5 and 8 are not passed to the script. However, if I call Python (full disclosure, we are using a standard installation of Python 3.3) instead, passing the script as a parameter, as follows:

 

File Pathname: c:\Python33\python.exe

Argument Expression: "sum.py 2 5 8"

 

Then the script is called with the arguments.

 

Does anyone have any experience with this and/or any advice? I can call Python directly, but would prefer to simplify things where possible.

 

Thanks,

David

 


Viewing all articles
Browse latest Browse all 6524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>