Hi Allan,
On 18 Jan 2015, at 13:52 , Allan Odgaard mailinglist@textmate.org wrote:
I see — you might have the external script issues sorted out by now, but another alternative (where we do not have to consider AppleScript’s string quoting rules embedded into a shell string) would be to use an environment variable, for example:
import pipes import subprocess
path = "That's an "environment" variable!" cmd = "PDF={} osascript -e 'tell app "TextMate" to display alert (system attribute "PDF")'".format(pipes.quote(path)) subprocess.call(cmd, shell=True)
thanks for the advice. With my current knowledge that is the solution I would have chosen to fix the quoting problem. The compiled version of the script seems to work too though. I will leave it like it is for now.
Kind regards, René