This VI sends inputs to a simple Python script, and returns its output. The basic method could be used to call code from many different languages, like Python, Perl, and Tcl.
Requirements: LabVIEW, Python
Instructions
- Download the simple Python script AddNumbers.py attached below.
- Download Calling Python Script.vi (or the PNG code snippet).
- Place the Python script and the VI in the same folder (this is simply expected by the example, and could be changed).

VI Details
- Build path to Python script, which is expected to be in the same folder as this VI. Again, the Python script could be moved, but the code would have to reflect that change.
- Create the command line argument, in the form of pythonpath scriptpath int32 int32. Quotation marks are used for the path, in case there are spaces.
- Execute the argument. The run in minimized, so that the command window does not quickly appear and disappear.
- Convert the string output from Python to an int.