Is there any way to avoid the single-quotes around a % string?
I am trying to do this:
playCmd = """osascript -e 'tell application "iTunes" to play track %r'""" % theSong
that results in: …play track ‘theSong’
not: …play track theSong
like I want. I would just use playCmd.relpace, but because of the single-qoutes (‘tell app…’) before the single-quotes on theSong, I can’t do this easily. Any ideas?
Is there a reason why
%sis inappropriate? Because replacing%rwith%sis the first thing I’d try.