|
|
本帖最后由 snljty 于 2021-5-12 14:16 编辑
108行
- print >> sys.stdout, "The file closest to the Jarzynski Average is: %s" % asmdfile
复制代码
改成- print("The file closest to the Jarzynski Average is: %s" % asmdfile)
复制代码
然后70-72行
- #open standard output/error files
- sys.stdout = os.fdopen(sys.stdout.fileno(),'w',0)
- sys.stderr = os.fdopen(sys.stderr.fileno(),'w',0)
复制代码 删去。这两个变量除了上面改的地方,压根没用到。而且python3不需要自己打开这两个文件。
顺便,python3自带的库里应该有个叫2to3(.py/.exe/没有后缀)的程序,直接用这个就能完成很多转换。没有测试文件只能改到这里,还有什么问题的话可以把测试文件贴上来。
|
评分 Rate
-
查看全部评分 View all ratings
|