LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Running python script

I am trying to run a python script in labview. I downloaded python 2.6 and the open g python tools. The python script requires 3 inputs and it creates an output file. I have added the 3 inputs and file ouput to the python script node. I get an error message "LabVIEW:  LabVIEW cannot initialize the script server.  Ensure the server software is installed. in PYTHON Script Node__ogtk.vi". What am I doing wrong?
0 Kudos
Message 1 of 7
(5,130 Views)

Try using Python 2.5; I had trouble with 2.6 and had to step back.

 

If you'd like, post your code and I'll see if it runs for me.

 

</jim> 

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 2 of 7
(5,108 Views)
Message 3 of 7
(5,103 Views)
Here is the code. The values that need to be specified are 'cheight' (could be a value of 1000), 'cpressure' (could be 800) and 'ctemperature' (could be 10). An output file should be created with calculated values. The code should be invoked as follows:
Options:
-h, --help show this help message and exit
-F CHEIGHT, --cloudbaseheight=CHEIGHT
Cloud base height
-P CPRESSURE, --cloudbasepres=CPRESSURE
Cloud base pressure
-T CTEMPERATURE, --cloudbasetemp=CTEMPERATURE
Cloud base temperature
-o FILE, --output=FILE
write output to FILE
0 Kudos
Message 4 of 7
(5,076 Views)

I got this error: Error 1050 occurred at PYTHON Execute Script__ogtk.vi->Untitled 3:, global name 'OptionParser' is not defined

 

That tells me that I'm not getting the library, but am getting Python.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 5 of 7
(5,059 Views)
Can you save this for Labview 8.5 version and repost?
0 Kudos
Message 6 of 7
(5,055 Views)
8.5
Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 7 of 7
(5,049 Views)