title: Python GTK + webkit - insert JavaScript after gtk.main()
body: <p>I tried this in terminal and everything is OK, but if I run this inside script I can not insert JavaScript after gtk.main()</p>
  
  <pre><code>import gtk
  import webkit
  
  w = gtk.Window()
  b = webkit.WebView()
  w.add(b)
  b.open('http://example.com')
  w.show_all()
  
  gtk.main() # this I don`t run inside terminal
  
  #and after showing window I want to insert some JavaScript code
  
  js = 'alert("a");'
  b.execute_script(js)
  </code></pre>
  
  <p>How to solve this? Thanks in advance!</p>