Jump to content

Python script node and gzip?


Recommended Posts

The group I'm working with would like me to use gzip to compress files instead of the zip palette functions in Labview. I got to thinking that the easiest way to do this would be to use the Python script node, which I saw and downloaded a couple of years ago, but never actually used. The machine I was working on got shipped away.

Does the Python script node still exist, and if so, can anybody point me to the source? Searched but ended up chasing my tail.

Also, if anybody has suggestions for a better way to approach this puzzle, sing out. I looked and couldn't find a gzip dll, but may not have been looking in the right places.

Thanks,

Bill

Link to post
Share on other sites

The group I'm working with would like me to use gzip to compress files instead of the zip palette functions in Labview. I got to thinking that the easiest way to do this would be to use the Python script node, which I saw and downloaded a couple of years ago, but never actually used. The machine I was working on got shipped away.

Does the Python script node still exist, and if so, can anybody point me to the source? Searched but ended up chasing my tail.

Also, if anybody has suggestions for a better way to approach this puzzle, sing out. I looked and couldn't find a gzip dll, but may not have been looking in the right places.

What's the reason for using gzip instead of ZIP format? Knowing that would give us a better idea about your needs.

As to the Python node, you can find that under LabPython.

The OpenG Tools don't support the gzip format out of the box. While it wouldn't be impossible to support it, since both make use of zlib internally, it's quite a bit of work.

But integrating gzip by using LabPython is really very roundabout. Have you looked at executing the gzip executable through System Exec?

Link to post
Share on other sites

But integrating gzip by using LabPython is really very roundabout. Have you looked at executing the gzip executable through System Exec?

That's what I was going to suggest. At one point I was trying to interface with 7-zip through the command line and I believe it too supports gzip compression.

Link to post
Share on other sites

Thanks for system exec suggestion, I'd forgotten about that. May not be last question I ask.

In answer to "why gzip?", it's basically because one guy insists on it. Wants to stream data direct from the zip files and has already written apps on his end where they are working in Linux. He asked for pepsi, but I found the fridge full of coke. I already wrote an app that looks for our raw data files and uses the LV palette functions to zip them, but "no sale". He's already found a workaround, but I thought I should see if I can do this without major time investment.

Link to post
Share on other sites

Well, downloaded the gzip exe utility, put gzip.exe in System32, and it compresses our 100MB data file to about 6MB just fine when run from the win-dos command line, When I try it in system exec with only the command line:

gzip <full path to file>

I get an error dialog saying "Labview: memory full". tried increasing the expected output to 10MB, no joy. Any idea what I'm doing wrong? Or is the system exec somehow limited to smaller jobs?

Thanks

BG

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.