I've been programming uC's as a hobby in C for some 25 years. Started with the at90s2313 when it was brand new and I discovered GCC had a port to it.
Before that, uC's were always difficult and expensive for various reasons.
Lately I've also learning Python. It is not a language I particularly like. It feels like it's developed by hobbyists. It has a completely ridiculous dependency on whitespace for example. It has also taken over 10 years for python2 to finally go obsolete, and in the last year some open source projects were struggling to convert to Python3 because they depended on some Python libraries that were still not available for Python 3.
Here some more about the limitations of Python:
https://towardsdatascience.com/why-python-is-not-the-programming-language-of-the-future-30ddc5339b66https://towardsdatascience.com/pythons-expiration-date-b1a55f368f1ahttps://www.quora.com/What-are-the-main-weaknesses-of-Python-as-a-programming-languageThat said, the decision to start learning Python3 was not a light one for me. It seems that Python has become the de facto standard for scripting stuff.
Sigrok uses Python for the protocol decoders, so you fairly easily modify one for your own lab needs.
KiCad uses Python as a scripting language for the footprint wizards, the "replicate layout" script and more.
FreeCAD also uses Python for scripting.
Python is not a fast language, but the amount of data generated by a serial port or GPIB bus is minimal for an even 15 year old PC.
Python is pretty good at file (and data) manipulation. Opening a file, reading it into a buffer, searching through it, and conditionally replace something in the file is about 5 lines of python code.
In the last 2 weeks or so I've been working on my first real Python program, which I have named MumarPlot and attached to this post. It is a prgram that catches data from a Socket, and uses that data to draw graphs with it with matplotlib. It can also store the data to a file, and read those files back.
As it is, it's very preliminary, has some serious bugs and half the comment is in Dutch, but still, I attach it here because it seems to be very near to what you want. There is also lots of debug info in the program which are mostly left overs from the earliest stages of the MumarPlot. Note that I am still learning Python.
You can test MumarPlot by starting netcat in listening mode: "netcat localhost 3000 -l" , and after starting MumarPlot (which has it's own command interpreter) type "feed localhost 3000" on the command prompt. After that you can Copy & Paste "Motor.txt" in netcat to see a graph being drawn of some PID parameters of a motor controller.
You do have to install matplotlib to run MumarPlot. If I remember well I did it with "sudo apt install python3-matplotlib".