|
From: | Gianmaria Lari |
Subject: | Re: frescobaldi clipboard file name |
Date: | Tue, 24 Apr 2018 08:53:01 +0200 |
On Mon 23 Apr 2018 at 09:43:01 (+0200), Gianmaria Lari wrote:
> The following frescobaldi snippet call the "more.com" program with the
> parameter "\\readme"
>
> -*- python;
> from subprocess import call
> call(["more.com", "\\readme"])
>
> This other one-line snippet pastes, in the frescobaldi editor window at the
> cursor position, the lilypond file name (including path) of the current
> document
>
> $FILE_NAME
>
> Now I would like to merge the two worlds:) I would like a snippet that
> calls an external application passing as parameter $FILE_NAME.
> Any suggestion?
import os # likely to have been imported already
call(["more.com", os.environ['FILE_NAME']])
-*- python;
text = "ciccio"
Now if I try....
-*- python;import ostext = os.environ['FRESCOBALDI_VERSION']
[Prev in Thread] | Current Thread | [Next in Thread] |