因此,我有几个在Python中运行的线程,并且我试图在每个线程中获取一个值,我希望用户能够输入一个条目,以便在返回值后启动该线程,例如: / p>
def adding(self):
print 'Hello'
name = raw_input("Press enter once hello is printed... ")
execute rest of function .........
但是,当我这样做时,会出现错误:
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/Users/xxx/xxx/xxx.py", line 495, in run
self.adding()
File "/Users/xxx/xxx/xxx.py", line 285, in adding
name = raw_input("Press enter once hello is printed... ")
EOFError: EOF when reading a line
我在做什么错了,或者我该如何更改才能做我想做的事情。