Note that there are some explanatory texts on larger screens.

plurals
  1. POpydev interactive console and raw_input
    primarykey
    data
    text
    <p>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.</p> <p>For example:</p> <p>I run name = raw_input('name:')</p> <p>I reply: name:martin</p> <p>and I get as a result:</p> <p>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</p> <p>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?</p> <p>The most similar post I found is: <a href="https://stackoverflow.com/questions/7747871/greeting-program">Greeting program</a> but I'm using raw_input already.</p> <p>I have also tried raw_input().replace('\r', '') and eval(raw_input().replace('\r', '')) as suggested in <a href="http://pydev.org/faq.html#PyDevFAQ-hyrawinput%28%29%2Finput%28%29doesnotworkcorrectlyinPyDev%3F" rel="nofollow noreferrer">http://pydev.org/faq.html#PyDevFAQ-hyrawinput%28%29%2Finput%28%29doesnotworkcorrectlyinPyDev%3F</a> but I still have this strange behavior.</p> <p>Thanks Martin</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload