mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 03:11:59 +00:00
configure.py : replace os.popen with subprocess.Popen
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39526 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
7ea78193ca
commit
f51dffd231
@ -8,7 +8,7 @@
|
|||||||
# \author Bo Peng
|
# \author Bo Peng
|
||||||
# Full author contact details are available in file CREDITS.
|
# Full author contact details are available in file CREDITS.
|
||||||
|
|
||||||
import sys, os, re, shutil, glob, logging
|
import glob, logging, os, re, shutil, subprocess, sys
|
||||||
|
|
||||||
# set up logging
|
# set up logging
|
||||||
logging.basicConfig(level = logging.DEBUG,
|
logging.basicConfig(level = logging.DEBUG,
|
||||||
@ -60,9 +60,7 @@ def cmdOutput(cmd):
|
|||||||
'''utility function: run a command and get its output as a string
|
'''utility function: run a command and get its output as a string
|
||||||
cmd: command to run
|
cmd: command to run
|
||||||
'''
|
'''
|
||||||
fout = os.popen(cmd)
|
output = subprocess.check_output(cmd, shell=True)
|
||||||
output = fout.read()
|
|
||||||
fout.close()
|
|
||||||
return output.strip()
|
return output.strip()
|
||||||
|
|
||||||
|
|
||||||
@ -1104,7 +1102,7 @@ def checkLatexConfig(check_config, bool_docbook):
|
|||||||
cl.close()
|
cl.close()
|
||||||
#
|
#
|
||||||
# we have chklayouts.tex, then process it
|
# we have chklayouts.tex, then process it
|
||||||
fout = os.popen(LATEX + ' wrap_chkconfig.ltx')
|
fout = subprocess.Popen([LATEX, "wrap_chkconfig.ltx"], stdout=subprocess.PIPE).stdout
|
||||||
while True:
|
while True:
|
||||||
line = fout.readline()
|
line = fout.readline()
|
||||||
if not line:
|
if not line:
|
||||||
|
Loading…
Reference in New Issue
Block a user