title: Use Thread in Pygtk
body: <p>I'm in a project to develop a chat application like netmeeting. I want to separate thread one is for GUI (gtk.main) another is simultaneously accepting client chat request (socket.accept) . But there is a problem..</p>
  
  <p>here is my simple line of code which is 2nd thread for accepting client request:</p>
  
  <pre><code>while True:
      self.new_sock,self.client_addr = self.sock.accept()
      #CloseDialog is a messege box
      respons=self.CloseDialog.run()
      if respons==gtk.RESPONSE_YES:
          #Call a Chat Window         
      elif respons==gtk.RESPONSE_NO:
          #Close the requested socket
  </code></pre>
  
  <p>when i run the application it switch to the gtk.main loop and my 2nd thread is unable to run. is there any process to run those thread parallel, But I'm very confuse to implement this. if you need any further information I will give it to you. Please help me.. 
  thanks in advance</p>