[TxMt] Re: LaTeX bundle wont stop opening TeXShop
René Schwaiger
sanssecours at f-m.fm
Sun Jan 18 17:26:06 UTC 2015
Hi Allan,
> On 18 Jan 2015, at 13:52 , Allan Odgaard <mailinglist at 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é
More information about the textmate
mailing list