01-05-2012 01:43 PM
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
01-05-2012 02:29 PM
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
01-06-2012 02:18 AM - edited 01-06-2012 02:20 AM
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.