title: Output QProcess does not work after creating exe with Pyinstaller
body: <p>I created a GUI with PyQt which calls another Python script with QProcess. The output should be written to the GUI. When I run the program as a Python script it works fine. However when I create a exe with PyInstaller nothing is written to the gui. So, it seems like the process is not starting. What I am doing wrong?</p>
  <p>Here the command I use to create the exe:</p>
  <pre><code>python -m PyInstaller PreGui_pipeline.py --onefile --add-data &quot;PostGui_pipeline_test.py;.&quot;
  </code></pre>
  <p>Below the part where I start QProcess:</p>
  <pre><code>self.message(&quot;START OF THE FLASHING PROCESS \n&quot;)
  self.p = QProcess()
  self.p.readyReadStandardOutput.connect(self.handle_stdout)
  self.p.finished.connect(self.finish_flash)
  
          
  try:
      # PyInstaller creates a temp folder and stores path in _MEIPASS
      base_path = sys._MEIPASS
  except Exception:
      base_path = os.path.abspath(&quot;.&quot;)
  
  path = os.path.join(base_path, &quot;PostGui_pipeline_test.py&quot;)
  
  self.p.start(&quot;python&quot;, [path, str(self.flash), str(self.full_auto), self.config_path])
  </code></pre>
  <p>And here the code of the script which is called by QProcess (no a little cutted for easier understanding):</p>
  <pre><code>def cprint(*args):
  
      for output_text in args:
          old_stdout.write(&quot;&gt;&gt;&quot; + str(output_text) + &quot;&lt;&lt;&quot;)
      old_stdout.flush()
      os.fsync(old_stdout.fileno())
  
  if __name__ == &quot;__main__&quot;:
  
      old_stdout = sys.stdout 
      cprint(&quot;Test&quot;)
  </code></pre>
  <p>So when I run the py file it writes &quot;Test&quot; to the GUI and when I run it as a exe nothing happens.</p>