Pydev 2.5 と Python 3.2 では、モジュールの内容を対話型コンソールに「」ロードしようとすると問題があります。Ctrl+Alt+Enter を押すと、Pydev は exec(compile(open(filename).read) ではなく execfile(filename) を起動します。 (), filename, 'exec'), globals, locals) - 後者は Python 3+ での execfile() の置き換えです...
では、この動作を変更するにはどうすればよいでしょうか。
ETA: もう少し具体的に言うと、次のようになります: 新しい PyDev モジュールを作成し、たとえば「test.py」とします。簡単な関数 def f(n): print(n) を作成し、Ctrl+Alt+Enter を押します。次に、「現在アクティブなエディターのコンソール」を選択し、Python 3.2 インタープリター、対話型コンソールが起動すると、次のようになります。
>>> import sys; print('%s %s' % (sys.executable or sys.platform, sys.version))
PyDev console: using default backend (IPython not available).
C:\Program Files (x86)\Python\3.2\python.exe 3.2.3 (default, Apr 11 2012, 07:15:24) [MSC v.1500 32 bit (Intel)]
>>> execfile('C:\\testy.py')
>>> f(1)
Traceback (most recent call last):
File "<console>", line 1, in <module>
NameError: name 'f' is not defined
ご覧のとおり、Python 3 以降では exec() の代わりに execfile() を使用しています...