I have a Windows program running under Wine. That Windows program lets me set up "tools" to run external programs and then it will capture their standard output/error and show it to me within the Windows program's interface.
I want to be able to run a native Linux program as such a tool. I am able to get my Windows program to run a Linux program, but it doesn't get access to the output. Instead, the Linux program's output is shown in the console window from which I ran the Windows program.
My specific program is EditPad Pro, a text editor, but I would like if possible a solution that works for any Windows program that runs external programs. (Many text editors have such a feature, for instance, to be able to compiler/run the source code being edited.)
As an example, I tried to run
/usr/bin/python3 --version as an external tool, to test things. I open an ordinary linux terminal and do
wine myprogram.exe. Within Myprogram, I set up
/usr/bin/python3 --version as an external tool. (I have also tried using
start /unix ahead of this but that didn't work either.) When I run the tool, the Python version information is displayed in the linux terminal where I typed
wine myprogram.exe. Myprogram sees no output from Python. But I want that output to be going to "Myprogram", which is the one running it, not to the linux terminal that launched Myprogram.
How can I achieve this?