From 4a35dbe6b20ec9f618c77ebe89e650105fbc1b37 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 12 Nov 2010 13:05:43 +0900 Subject: [PATCH] python2.7/win32 fix for latex --- anki/latex.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/anki/latex.py b/anki/latex.py index c8491bee5..1db827ff0 100644 --- a/anki/latex.py +++ b/anki/latex.py @@ -121,7 +121,10 @@ def buildImg(deck, latex): oldcwd = os.getcwd() if sys.platform == "win32": si = subprocess.STARTUPINFO() - si.dwFlags |= subprocess.STARTF_USESHOWWINDOW + try: + si.dwFlags |= subprocess.STARTF_USESHOWWINDOW + except: + si.dwFlags |= subprocess._subprocess.STARTF_USESHOWWINDOW else: si = None try: