subprocess.call

前端 未结 3 834
慢半拍i
慢半拍i 2020-12-10 21:48

I am new to the subprocess.call function and I have tried different combinations of the same call but it is not working.

I am trying to execute the following command

3条回答
  •  悲&欢浪女
    2020-12-10 22:05

    it is not to compecated execute above command in python:

    import subprocess
    import sys
    proc = subprocess.Popen(['sort','-k1','1', '-k4','4n', '-k5','5n',    '+outpath+fnametempout+', '>', '+outpath+fnameout'],stdin=subprocess.PIPE)
    proc.communicate()
    

提交回复
热议问题