Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. from threading import Thread
  2. from time import wait
  3.  
  4. class ParseThread(Thread):
  5.      def __init__(self, text):
  6.           Thread.__init__(self)
  7.           self.text = text
  8.      
  9.      def run(self):
  10.           wait(2)
  11.           print(self.text)
  12.  
  13. if __name__=="__main__":
  14.      thread_list = []
  15.      while True:
  16.           usin = input(">> ")
  17.           thread_list.append(Thread(usin))
  18.           thread_list[-1].run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement