add wait kwarg to call()

This commit is contained in:
Damien Elmes 2009-03-15 06:36:19 +09:00
parent af176921df
commit df3185ab0f

View file

@ -57,12 +57,13 @@ def stripLatex(text):
text = text.replace(match.group(), "")
return text
def call(*args, **kwargs):
def call(*args, wait=True, **kwargs):
try:
o = subprocess.Popen(*args, **kwargs)
except OSError:
# command not found
return -1
if wait:
while 1:
try:
ret = o.wait()