Updated image construction code to also use subprocess.Popen.
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
|
||||
""" Import externals """
|
||||
import os.path
|
||||
from subprocess import Popen,PIPE
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
@@ -70,7 +71,9 @@ def cmdpushwrite(cmd,data,fname):
|
||||
"""
|
||||
fp = open(fname,'w')
|
||||
# execute command
|
||||
cin,cout = os.popen2(cmd,'b')
|
||||
p = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE)
|
||||
(cin,cout) = (p.stdin, p.stdout)
|
||||
|
||||
cin.write(data)
|
||||
cin.close()
|
||||
for l in cout.read():
|
||||
|
||||
Reference in New Issue
Block a user