所以我目前有一个正在输出的线程,我需要一种处理输入的方法,同时仍允许线程输出。
目前我有类似的东西
def thread_func():
while True:
print("Information")
threading.Thread(target=thread_func).start()
while True:
command = raw_input("Enter a command:")
#dostuff with command
我现在的问题是我的帖子没有打印任何东西。或者如果它没有出现
修改
在这里找到解决方案 Exiting while loop by pressing enter without blocking. How can I improve this method?