SyntaxError:行继续符后面的意外字符

时间:2016-06-14 14:51:18

标签: python python-2.7

import os
os.system("grep MCM_END /storage/users/siditom/fastspace/AutoCaspSubmission/CASP12/T0860/stage2/xml/*.xml | sort -k 16 | grep -v NaN | tail -10 | awk '{print($1"\t"$16)}' | sed s/:\<ProteinInfo//g | sed s/MESHI.SERVER_weightedMedianScore=\"//g | sed s^/storage/users/siditom/fastspace/AutoCaspSubmission/CASP12/T0860/stage2/xml/^^g | sed s/.scwrl/' '/g | awk '{print ( $1"\t"$3 ) }'")

1 个答案:

答案 0 :(得分:0)

如下编写代码可以解决问题。我相信你的“\ t”被认为是一个行连续加上一个t,这将是一个意外的角色。

import os
os.system("grep MCM_END /storage/users/siditom/fastspace/AutoCaspSubmission/CASP12/T0860/stage2/xml/*.xml | sort -k 16 | grep -v NaN | tail -10 | awk '{print($1\t$16)}' | sed s/:\<ProteinInfo//g | sed s/MESHI.SERVER_weightedMedianScore=\"//g | sed s^/storage/users/siditom/fastspace/AutoCaspSubmission/CASP12/T0860/stage2/xml/^^g | sed s/.scwrl/' '/g | awk '{print ( $1"\t"$3 ) }'")