LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Python Node Multi-Line String Function Parameter

Does anyone have any suggestions for passing a multiline string as a function parameter while using the Labview Python Node? In the attached "PythonExampleWithMultiLineError.vi" I get a Python TypeError for the "message" parameter. When I run the SendPlainText function in my Python IDE (Sublime Text) I need to pass the parameter as a multiline string using triple quotes (""" string """) and it works fine with no TypeError returned. However, I don't know how to pass this parameter as a multi-Line string to the Python Node. I have tried encapsulating it in triple quotes in the front panel string control but Labview just interprets the triple quotes as part of the string.

 

If you plug in valid email account info to the VI instead of the sample Don & Nancy info there now the SendPlainText function works and sends the email but I get a TypeError returned in the Labview Error Out indicator.  

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

You have configured the Python node to return a string but SendPlainText has no return value.

 

Multi-line strings are no big deal, just pass them directly into the Python node.  Triple-quotes and such are interpreter constructs and not required in this situation.

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