当我尝试执行以下代码时:
#!/usr/bin/env python3
import os
commant_python_file = 'python2 C:\\EMAN2\\bin\\e2pdb2mrc.py'
def pdb2mrc(pdb_file, resolution):
call= commant_python_file + " -R "+str(resolution)+" "+str(pdb_file)+" salida.mrc" + " > NUL: "
print(call)
os.system(call)
pdb2mrc("PDB_exist/6yif_A.pdb",5)
它会产生以下错误:
pythone C:\EMAN2\bin\e2pdb2mrc.py -R 5 PDB_exist/6yif_A.pdb salida.mrc > NUL:
File "C:\Users\HP\AppData\Local\Programs\Python\Python38\lib\site.py", line 178
file=sys.stderr)
^
SyntaxError: invalid syntax
有人知道为什么吗?