Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. #! /usr/bin/python
  2.  
  3. import hello
  4. from threading import Thread
  5.  
  6. def myfunc():
  7.  
  8. hello.HelloWorld().main()
  9.  
  10. t = Thread(target=myfunc)
  11. t.start()
  12.  
  13. print 'nstill running ???'
  14.  
  15. #! /usr/bin/python
  16.  
  17. import gtk
  18. from time import sleep
  19. from threading import Thread
  20.  
  21.  
  22. def myfunc():
  23. w = gtk.Window()
  24. l = gtk.Label()
  25. w.add(l)
  26. w.show_all()
  27. w.connect("destroy", lambda _: gtk.main_quit())
  28. gtk.main()
  29.  
  30. def myfunc2():
  31. sleep (3)
  32.  
  33. t = Thread(target=myfunc)
  34. #t = Thread(target=myfunc2)
  35. t.start()
  36.  
  37. print 'nstill running ???'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement