How do I run an external command that I write from a unix shell or window command prompt?
shell python command subprocess external
os.system("some_command < input_file | another_command > output_file")
os.popen("echo Hello World").You can write read()
subprocess.Popen("echo Hello World", shell=True, stdout=subprocess.PIPE).stdout.read()
should be used together.
© 2024 OneMinuteCode. All rights reserved.