Daehyun
11/13/2016 - 1:26 AM

waiting.py

from time import sleep 
from threading import Thread 

def waitingInput(tp):
  while True:
    inp = input('Type: ')
    print('Typed: {}'.format(inp))
    if inp == tp:
      return True 

quitting = False 
def wrapper():
  global quitting
  quitting = waitingInput('quit')

th = Thread(target=wrapper)
th.start()
while not quitting:
  sleep(1)
th.join()