From 0416c5b6366f6ac0e6b9b2316c03e2669a66fded Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Mon, 17 Jul 2023 22:02:44 +0200 Subject: use shell to start show command Hopefully this is enough to successfully start the default program on windows. --- quiz.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quiz.py b/quiz.py index 45af0c4..20eacda 100755 --- a/quiz.py +++ b/quiz.py @@ -31,7 +31,7 @@ if platform.system() != 'windows': SHOW_QUESTION_CMD = 'xdg-open' PLAY_SOUND_CMD = 'mpv' else: - SHOW_QUESTION_CMD = 'cmd.exe /c start' + SHOW_QUESTION_CMD = 'start' PLAY_SOUND_CMD = 'vlc.exe --intf=dummy --dummy-quiet' @@ -148,7 +148,7 @@ def load_solutions(question_dirs: list[Path], def show_question(question: Path) -> subprocess.Popen: """show the question in an external programm and return the process""" cmd = f'{SHOW_QUESTION_CMD} "{question}"'.split() - return subprocess.Popen(cmd) + return subprocess.Popen(cmd, shell=True) def color_button(layout, text: str, color: str): -- cgit v1.2.3