print ("test",file=name)类似的方法在python 2中需要先引入 __future__才可使用
import __futhure__ import print_function
Python 2.7 中使用 Print 方法
原文:http://www.cnblogs.com/kfx2007/p/3549208.html