Hacker News new | ask | show | jobs
by ginko 1594 days ago
Did you add them as separate strings like this?

  subprocess.run(["mpv", "--vo=tct", "--quiet", DirectLink])
Otherwise your terminal may be missing true-color terminal mode or the mpv in your distro doesn't have that output plugin. (You can check with "mpv --vo=help")
1 comments

If, like me, you forget where to split the command and arguments, shlex.split in the standard library can split the raw string for you.
Rule of thumb is every space, except ones you'd normally put between quotes. so e.g.

    foo quix-quiz "bar baz"
turns into

    ["foo", "quix-quiz", "bar baz"]
Though do note that you don't get an extra set of quotes on "bar baz" which is slightly confusing, but makes sense once you think about it a bit.