LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labpython unable to import copy_reg

Solved!
Go to solution

lshi,

 

Yes, it is my understanding that labpython is an interpreter that calls to an existing python engine on the machine.

 

Verify that you can call the file using python outside of LabVIEW.  This will be a good troublshooting step.

I am curious of permissions when using the base directory in the D:\ drive.

 

 

Daniel

 

Applications Engineer
National Instruments
0 Kudos
Message 11 of 13
(770 Views)

Daniel


Yes, I can excute the python file by simply python it, and I can even do so inside labview with the "system Exec". It just somehow I cannot do it with labpython.

Well, I can read, write, creat and delete, so basically anything I want.

 

Thanks,

 

Lei

0 Kudos
Message 12 of 13
(765 Views)

LapPython is simply a wrapper around the pythonxx.dll, to translate the embedding API of Python either into the script node API of LabVIEW or into a VI interface. As such it does actually not really anything to setup the Python environment in a specific way. It simply loads the Python DLL, and initializes a session in which the Python files are loaded and executed.

 

That all said, the Python embedding API is there, works fairly well, but the Python community has been in the past rather passive about adding or improving it in any way. I got the impression that the leader of the project saw it rather as a liability to the project than a feature. Any attempts of embedding Python into anything seemed to have to do it on their own and questions about how to do it in the Python list stayed largely unanswered. Also there was no warranty that this API will not change, crumble or whatever between versions.

 

As I have moved on to other projects since, I have not followed the Python situation much. All of the above could have changed but I don't know.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 13 of 13
(757 Views)