Why not just piggyback off the existing python script for the NanoVNA
by edy555 @ ?
You can just throwaway what you don't need and keep what is useful.
First, I did not know enough Python to easily sort that,
was planning to use C# because experience and less baggage on Windows,
but Rune provoked me to try Python, and his was easy to hack:
Still needs a graceful exit for nanoVNA not found: