Let lyxpreview2bitmap.py also work on Windows when the PyWin extension modules

are not installed.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39741 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2011-09-24 01:27:40 +00:00
parent 144a69f4eb
commit a55f54b903

View File

@ -111,7 +111,11 @@ def find_exe_or_terminate(candidates):
def run_command_popen(cmd):
pipe = subprocess.Popen(cmd, shell=True, close_fds=True, stdin=subprocess.PIPE, \
if os.name == 'nt':
unix = False
else:
unix = True
pipe = subprocess.Popen(cmd, shell=unix, close_fds=unix, stdin=subprocess.PIPE, \
stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)
cmd_stdout = pipe.communicate()[0]
cmd_status = pipe.returncode