1 Antwort
+ 5
<< You should use subprocess. Not that it makes any difference, it's just newer module intended to replace os.system (have a look at this section [ http://docs.python.org/2/library/subprocess.html#replacing-os-system ] for a drop-in replacement). It also has more features in case you need them one day.
In short: there is no reason to use os.system (except for compatibility with older versions of Python). >>
Source:
https://stackoverflow.com/questions/17094423/os-system-vs-subprocess-in-python-on-linux
And about your second question:
https://www.google.com/search?q=pipe+command+python