diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-07-17 22:02:44 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2023-07-17 22:02:44 +0200 |
| commit | 0416c5b6366f6ac0e6b9b2316c03e2669a66fded (patch) | |
| tree | 534acc44d0e2bdc8ad7499bae03f7086917a4191 | |
| parent | 2f29390fb8e395fd836e34324d51d2256e33b195 (diff) | |
| download | quiz-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-x | quiz.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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): |
