def search(self, widget):
     """
     Searches for more devices on the network when pressed.Refreshes the table layout
     """
     servicelistener.device={}
     servicelistener.device['IP']=[]
     servicelistener.device['PORT']=[]
     self.window.remove(self.table)
     servicelistener.listen()
     self.create_table()
     self.window.show_all()

        self.pipeline.set_state(gst.STATE_PLAYING)

    def selection(self, widget, n):
        """
        Assign toplay the value of the selected device
        """
        toplay['IP']=device['IP'][n]
        toplay['PORT']=device['PORT'][n]
        self.play(toplay)
    
    def search(self, widget):
        """
        Searches for more devices on the network when pressed.Refreshes the table layout
        """
        servicelistener.device={}
        servicelistener.device['IP']=[]
        servicelistener.device['PORT']=[]
        self.window.remove(self.table)
        servicelistener.listen()
        self.create_table()
        self.window.show_all()

servicelistener.listen()
device=servicelistener.device
print device

start=Main()
gtk.main()