我在 python 2.7 中使用 raw_input API
我愿意:
mass_storage_choice = raw_input("Have you enabled USB mass storage on the phone Yes or No?");
我得到:
Traceback (most recent call last):
File "C:\tools\ide\juno\eclipse\plugins\org.python.pydev_2.7.3.2013031601\pysrc\pydevd_comm.py", line 765, in doIt
result = pydevd_vars.evaluateExpression(self.thread_id, self.frame_id, self.expression, self.doExec)
File "C:\tools\ide\juno\eclipse\plugins\org.python.pydev_2.7.3.2013031601\pysrc\pydevd_vars.py", line 376, in evaluateExpression
result = eval(compiled, updated_globals, frame.f_locals)
File "<string>", line 1, in <module>
NameError: name 'Y' is not defined
任何想法为什么?