title: GUI using Pygtk and glade
body: <p>i am trying to build a GUI using pygtk and glade on Windows. I am a noob at python GUI building  so please excuse my noobness. I Looked up this <strong><a href="http://www.learningpython.com/2006/05/07/creating-a-gui-using-pygtk-and-glade/" rel="nofollow">tutorial</a></strong> and did exactly as it said. The only difference was that I am on Windows 7 Home Premium x64 .</p>
  
  <p>I put a Label and a button  in a window  using glade as in the tutorial and then i got a libglade xml file. Then i typed the following code</p>
  
  <pre><code>import sys
  import pygtk
  import gtk
  import gtk.glade
  
  pygtk.require("2.0")
  
  class HellowWorldGTK:
  
      def __init__(self):
  
          #Set the Glade file
          self.gladefile = "Hello_World.glade"  
          self.wTree = gtk.glade.XML(self.gladefile) 
  
          #Get the Main Window, and connect the "destroy" event
          self.window = self.wTree.get_widget("MainWindow")
  
          if (self.window):
              self.window.connect("destroy", gtk.main_quit)
  
  if __name__ == "__main__":
      hwg = HellowWorldGTK()
      gtk.main()  
  </code></pre>
  
  <p>I put both the files in the same folder and then i run a python interpreter from the command line into the folder.Apparently The program runs but the thing is that i'm unable to get the interface all i get on the command line is that that the Program is running. I dont even get an error or something.Is it due to the fact that i'm on Windows?? I thought that GTK was cross-platform and the same code should run on windows as well as on Linux??</p>
  
  <p>Also here is the .glade file generated by GLADE GUI designer</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;glade-interface&gt;
    &lt;!-- interface-requires gtk+ 2.24 --&gt;
    &lt;!-- interface-naming-policy project-wide --&gt;
    &lt;widget class="GtkWindow" id="Hello world!"&gt;
      &lt;property name="can_focus"&gt;False&lt;/property&gt;
      &lt;property name="resizable"&gt;False&lt;/property&gt;
      &lt;child&gt;
        &lt;widget class="GtkVBox" id="vbox1"&gt;
          &lt;property name="visible"&gt;True&lt;/property&gt;
          &lt;property name="can_focus"&gt;False&lt;/property&gt;
          &lt;child&gt;
            &lt;widget class="GtkLabel" id="Click Here!"&gt;
              &lt;property name="visible"&gt;True&lt;/property&gt;
              &lt;property name="can_focus"&gt;False&lt;/property&gt;
              &lt;property name="label" translatable="yes"&gt;label&lt;/property&gt;
            &lt;/widget&gt;
            &lt;packing&gt;
              &lt;property name="expand"&gt;True&lt;/property&gt;
              &lt;property name="fill"&gt;True&lt;/property&gt;
              &lt;property name="position"&gt;0&lt;/property&gt;
            &lt;/packing&gt;
          &lt;/child&gt;
          &lt;child&gt;
            &lt;widget class="GtkButton" id="Please Click on the Button!"&gt;
              &lt;property name="label" translatable="yes"&gt;button&lt;/property&gt;
              &lt;property name="visible"&gt;True&lt;/property&gt;
              &lt;property name="can_focus"&gt;True&lt;/property&gt;
              &lt;property name="receives_default"&gt;True&lt;/property&gt;
              &lt;property name="use_action_appearance"&gt;False&lt;/property&gt;
            &lt;/widget&gt;
            &lt;packing&gt;
              &lt;property name="expand"&gt;True&lt;/property&gt;
              &lt;property name="fill"&gt;True&lt;/property&gt;
              &lt;property name="position"&gt;1&lt;/property&gt;
            &lt;/packing&gt;
          &lt;/child&gt;
        &lt;/widget&gt;
      &lt;/child&gt;
    &lt;/widget&gt;
  &lt;/glade-interface&gt;
  </code></pre>