Hi Miki,

just put the gtk code into a class as seen here:
http://www.pygtk.org/pygtk2tutorial/ch-GettingStarted.html#sec-HelloWorld

put the rest of the code into another class or function, so you can call it 
from the first gtk class.

Then it will show first the window with the label, after it you call 

...
import pygtk
...
class gtkping(object):
    def delete_event(self, widget, event, data=None):
        return False

    def __init__(self):
        w = gtk.Window()
        w.connect("delete_event", self.delete_event)
        l = gtk.Label("pppp")
        w.add(l)
        w.show_all()
        #now you can call your ping functions

    def main(self):
        gtk.main()

def ping...


if __name__ == "__main__":
   test = gtkping()
   test.main()

-- 
"Feel free" - 5 GB Mailbox, 50 FreeSMS/Monat ...
Jetzt GMX ProMail testen: www.gmx.net/de/go/mailfooter/promail-out
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to