<br>I&#39;m writing a python gui app that will call a python cmd line app. The gui will take users input, pass it to the cmd line app, then display the cmd app program output. The idea is to give users who aren&#39;t comfortable with the cmd line a way to run the program, without having to open a shell window (on Linux) or cmd prompt&nbsp; (On Windows)
and get hung up on syntax or shell issues. It&#39;s a crutch.<br><br>The author of the cmd line app suggested I temporarily replace sys.stdout &#39;with a file descriptor class that can write directly to the gui&#39;.<br>

The author is now out of communications for a few weeks,&nbsp; so I can&#39;t elaborate.<br><br>However, I&#39;ve opened a file which writes to the disk, and replaced that sys.stdout with that file descriptor.<br>I can then close and open that file and have the output of his program.
<br>Now I can just put this in a textbox on the gui and display it to the user.<br><br>Writing to a file on disk, then reading it back in seems a bit clunky to me.<br>While I did somewhat do what the author had suggested (although I didn&#39;t make a class out of the file descriptor), and it works, is there a better way?
<br><br>