equal
deleted
inserted
replaced
46 p = subprocess.Popen(cmd, shell=True, bufsize=bufsize, |
46 p = subprocess.Popen(cmd, shell=True, bufsize=bufsize, |
47 close_fds=closefds, |
47 close_fds=closefds, |
48 stdin=subprocess.PIPE, stdout=subprocess.PIPE, |
48 stdin=subprocess.PIPE, stdout=subprocess.PIPE, |
49 stderr=subprocess.PIPE) |
49 stderr=subprocess.PIPE) |
50 return p.stdin, p.stdout, p.stderr |
50 return p.stdin, p.stdout, p.stderr |
51 def Popen3(cmd, capturestderr=False, bufsize=-1): |
|
52 stderr = capturestderr and subprocess.PIPE or None |
|
53 p = subprocess.Popen(cmd, shell=True, bufsize=bufsize, |
|
54 close_fds=closefds, |
|
55 stdin=subprocess.PIPE, stdout=subprocess.PIPE, |
|
56 stderr=stderr) |
|
57 p.fromchild = p.stdout |
|
58 p.tochild = p.stdin |
|
59 p.childerr = p.stderr |
|
60 return p |
|
61 |
51 |
62 def version(): |
52 def version(): |
63 """Return version information if available.""" |
53 """Return version information if available.""" |
64 try: |
54 try: |
65 import __version__ |
55 import __version__ |