I'm trying to redirect that standard output from a Command Line Project I wrote in C# and reading through the data in a Python file.
Currently, the C# application writes data that it reads from a sensor into a CSV file. I have to run the Python file later to get and process the data (has to be done in Python and the data collection has to be done in .NET to use the SDK).
I want to be able to run the C# and the Python projects at the same time and transfer the stream of data directly from the C# to Python project without the use of an intermediate, local file (the CSV).
I've done my own hunting on SO and in the MSDN Documentation. I'm looking at using the ProcessStartInfo.RedirectStandardOutput Property to redirect the console output of the C# application.
I don't yet know how to pick up on the data in this Stream from a Python file. This article was helpful in grasping a better understanding of how to approach it, but I'm still stuck.
I'm also looking at subprocess.Popen.communicate in Python but I'm not yet sure if that would work for what I am asking.
Any help would be appreciated.