5
पायथन में सबप्रोसेस के साथ आउटपुट को रीडायरेक्ट कैसे करें?
मैं कमांड लाइन में क्या करता हूं: cat file1 file2 file3 > myfile मैं अजगर के साथ क्या करना चाहता हूं: import subprocess, shlex my_cmd = 'cat file1 file2 file3 > myfile' args = shlex.split(my_cmd) subprocess.call(args) # spits the output in the window i call my python program
97
python
subprocess