def start_listener(gui):
    if gui:
        thread = threading.Thread(target=actually_start_listener)
        thread.start()
    else:
        actually_start_listener()
def start_listener(gui):
    if gui:
        thread = threading.Thread(target=actually_start_listener)
        thread.start()
    else:
        actually_start_listener()