Python3中的print函数

Z.p*_*yyy 4 python eclipse pydev python-3.x

我目前在Eclipse JavaEE Indigo中使用Python3.2.

我使用函数print如下:

input = open('test.txt', 'r')
for line in input:
    print(line, end='')
Run Code Online (Sandbox Code Playgroud)

Eclipse报告语法错误

print(line, end = '')
Run Code Online (Sandbox Code Playgroud)

它表明了这一点

Syntax error while detecting tuple.
print Found at: builtins
print(value, ..., sep=' ', end='\n', file=sys.stdout)
Run Code Online (Sandbox Code Playgroud)

但是,该程序运行完美.

有什么我可以做的删除错误符号或有什么更好的解决方案来解决这个问题吗?

fal*_*tru 6

将语法版本更改为Python 3.x.

语法版本

(上图来自http://pydev.org/manual_101_project_conf2.html)