daily pastebin goal
61%
SHARE
TWEET

Untitled

a guest Jun 14th, 2018 44 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. sock = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)    
  2. sock.bind(('',int(udportr.get())))
  3. start = "Starting..."
  4. q.send(start)
  5. t = Timer(1, lambda:q.send(a))
  6. t.start()
  7. a = 0
  8. bunch = []
  9. while True:
  10.     data, addr = sock.recvfrom(1400)    
  11.     if checksave.get() == 1:
  12.         filio.write(data)                        
  13.     if t.is_alive():
  14.         a +=1
  15.     else:
  16.         start_time = time.time()
  17.         print a
  18.         t = Timer(1, lambda:q.send(a))
  19.         t.start()
  20.         a = 0            
  21. sock.close()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top