aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2023-07-17 22:02:44 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2023-07-17 22:02:44 +0200
commit0416c5b6366f6ac0e6b9b2316c03e2669a66fded (patch)
tree534acc44d0e2bdc8ad7499bae03f7086917a4191
parent2f29390fb8e395fd836e34324d51d2256e33b195 (diff)
downloadquiz-0416c5b6366f6ac0e6b9b2316c03e2669a66fded.tar.gz
quiz-0416c5b6366f6ac0e6b9b2316c03e2669a66fded.zip
use shell to start show command
Hopefully this is enough to successfully start the default program on windows.
-rwxr-xr-xquiz.py4
1 files 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):