I'm using PyDev 2.5 in eclipse. When ever I use a raw_input command and I enter some text in the console this gets interpreted a console command resulting in a NameError.
For example:
I run name = raw_input('name:')
I reply: name:martin
and I get as a result:
Traceback (most recent call last): File "C:\Program Files\eclipse\plugins\org.python.pydev.debug_2.5.0.2012040618\pysrc\pydevd_comm.py", line 755, in doIt result = pydevd_vars.evaluateExpression(self.thread_id, self.frame_id, self.expression, self.doExec) File "C:\Program Files\eclipse\plugins\org.python.pydev.debug_2.5.0.2012040618\pysrc\pydevd_vars.py", line 384, in evaluateExpression result = eval(compiled, updated_globals, frame.f_locals) File "", line 1, in NameError: name 'martin' is not defined
the script seems to continue with name being 'martin' as expected but the console is getting cluttered with this error messages. Is there any way of getting rid off the NameError messages in the console?
The most similar post I found is: Greeting program but I'm using raw_input already.
I have also tried raw_input().replace('\r', '') and eval(raw_input().replace('\r', '')) as suggested in http://pydev.org/faq.html#PyDevFAQ-hyrawinput%28%29%2Finput%28%29doesnotworkcorrectlyinPyDev%3F but I still have this strange behavior.
Thanks Martin