]> git.lyx.org Git - features.git/commitdiff
Let lyxpreview2bitmap.py also work on Windows when the PyWin extension modules
authorEnrico Forestieri <forenr@lyx.org>
Sat, 24 Sep 2011 01:27:40 +0000 (01:27 +0000)
committerEnrico Forestieri <forenr@lyx.org>
Sat, 24 Sep 2011 01:27:40 +0000 (01:27 +0000)
are not installed.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39741 a592a061-630c-0410-9148-cb99ea01b6c8

lib/scripts/lyxpreview_tools.py

index b24f9721559e9db300c0bc733705236d9851b11a..7f2dcd75e796f5d0fed1eeabbcba003afd912593 100644 (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