import os cmd = 'wc -l my_text_file.txt > out_file.txt' os.system(cmd) ... a linux command in Python is to use Python module “subprocess”.
確定! 回上一頁