How to collect data efficiently with a command tool which taking 1s to collect one sample?

Hey @oleotiger,

I think what you want is the subprocess.Popen function (Python docs) and then read periodically from the PIPE.

Here are a couple of examples that I found online:

https://www.endpoint.com/blog/2015/01/28/getting-realtime-output-using-python