title: Error in tkinter when using subprocess function
body: <p>I'm trying to call a Python script through subprocess. The problem is that this action is launched through a function by clicking a button, and the GUI stops responding.</p>
  
  <pre class="lang-py prettyprint-override"><code>... Window code
          ''' BUTTON EXEC '''
          button_exec = tk.Button(self, text="Ejecutar", fg='black', bg='green',
                              command=self.generate_reporting_ger)
          button_exec.place(x=50, y=500, width=100, height=60)  
  
  ... Button code function
      def generate_reporting_ger(self):
          top = tk.Toplevel()
          top.focus_force()
          top.title("Ejecutando...")
  
          msg = tk.Message(top, text="Ejecutando calidad e integridad de GER, espere a que genere los resultados")
          msg.pack()
  
          try:
              p = subprocess.Popen(path + "GER_script.bat", bufsize=2048, shell=True,
              stdin=subprocess.PIPE, stdout=subprocess.PIPE)
              p.wait()
          except:
              tk.messagebox.showinfo("Error en la ejecución", "No se ha generado el reporting del sistema")
              top.destroy()
          tk.messagebox.showinfo("Ejecución terminada", "Se ha generado el reporting del sistema")
  
  
  </code></pre>