Python 执行 shell 命令

  • subprocess
import subprocess
transid = str(subprocess.check_output(['grep' , '-w', geneid, trans2gene])).strip()