Python3中的print函数

时间:2013-10-14 02:59:46

标签: python eclipse python-3.x pydev

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

我使用函数print如下:

input = open('test.txt', 'r')
for line in input:
    print(line, end='')

Eclipse使用

报告语法错误
print(line, end = '')

它表明

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

然而,该程序运行良好。

我有什么办法可以删除错误符号,还是有更好的解决方法可以解决这个问题?

1 个答案:

答案 0 :(得分:6)

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

Grammer Version

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