Does anyone know of a way to read and write the National Instruments binary file type (TDMS) in python under linux? I know that NI has a C DLL available, but I don't know how to access that through python, or if I even can do so under linux.
Asked
Active
Viewed 7,087 times
2 Answers
4
It looks like TDMS isn't directly supported under Linux (see here).
Your options currently are to use the G-based functions directly in LabVIEW (It's possible that you can wrap them in a .so file), calling LabVIEW from Python, or building your own file parser from the TDMS spec.
Sorry, no really easy options.
Edit: It looks like there may be an open source project to try to do this at http://sourceforge.net/projects/pytdms/. Worth a try, at least.
-
I ended up using the pyTDMS project. I had to fiddle with the LabView code in order to create the TDMS file in a way that pyTDMS could read it, but it worked perfectly after I got that going. – David Morton Jul 28 '11 at 19:42
-
3I had trouble reading my files with pyTDMS, but had more luck with npTDMS: http://pypi.python.org/pypi/npTDMS – PhilMacKay Feb 01 '13 at 16:19
2
You have to install the python version 2.7 (thats the only one that is working with the tdms package for labview atleast)
Sudo pip install npTDMS
and just follow the example on the page.

Arne Bakke
- 41
- 6