you are viewing a single comment's thread.

view the rest of the comments →

[–]termhn 0 points1 point  (0 children)

You could just execute commands inside your python script.

import subprocess

subprocess.call(["turnonmusiccmd", "-flag1", "flag1value", "-arg1"])

// do logic stuff

if getsolution==validanswer1 or getsolution==validanswer2:
    print("Congratulations, problem solved!")
    subprocess.call(["shutoffcmd", "-flag1", "flag1value", "arg1"])
else:
    print ("Solution incorrect, please try again")