0
votes

when i try to run code in the interactive console using Alt+Ctrl+Enter it gives that error

Traceback (most recent call last):
  File "<input>", line 1, in <module>
NameError: name 'runfile' is not defined

using python 2.7.6 eclipse 4.4 PyDev 3.7

2
Does it happen if you click on Run->Run or Ctrl+F11? - user3885927
no it runs in the default console perfectly - Andrew Adel
what's in your Run->'Run Configuration' MainModule field? - user3885927
${workspace_loc:andre/and.py} - Andrew Adel
I have this in my Window->Preferences->PyDev->Interactive Console: "import sys; print('%s %s' % (sys.executable or sys.platform, sys.version))" sys.executable will be used to run your code and may be adding this will help in yours. You can try and see. - user3885927

2 Answers

1
votes

This is really a bug in PyDev 3.7 (and 3.7.1).

The next version should have it fixed. You can apply the change: https://github.com/fabioz/PyDev.Debugger/commit/06fb7661875f27ae72aba6e037bb353a8629633c locally to have it fixed in your local installation (that file is in org.python.pydev/pysrc/pydevconsole.py)

0
votes

This problem seems to be related to the latest Pydev version 3.7

I have experienced the same problem on 2 installations after upgrading Pydev from 3.6 to 3.7

Eclipse 4.3.2 Python 2.7.6 and 3.4.0 Pydev upgraded from 3.6 to 3.7

After uninstalling Pydev 3.7 and reinstalling version 3.6 the problem is gone for me.