Created
September 13, 2015 09:34
-
-
Save tuksik/70208f458eefb96de748 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://stackoverflow.com/questions/1378974/is-there-a-way-to-start-stop-linux-processes-with-python | |
# WARNING https://docs.python.org/2/library/subprocess.html#frequently-used-arguments | |
def CMD(cmd) : | |
p = subprocess.Popen(cmd, shell=True, | |
stdin=subprocess.PIPE, | |
stdout=subprocess.PIPE, | |
stderr=subprocess.PIPE, | |
close_fds=False) | |
return (p.stdin, p.stdout, p.stderr) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment