On Wed, Nov 20, 2013 at 2:30 PM, Matt Wilkie <[email protected]> wrote:

> Hi Rengel,
>
> Leo does have that, though from your confusion I guess it's not
> highlighted well. The command is "execute-script", and bound by default to
> Ctrl-B. It's introduced in
> http://leoeditor.com/tutorial-scripting.html#hello-world (and there's an
> "all you can eat" version at http://leoeditor.com/scripting.html). It
> appears the "Programming with leo" chapter presupposes one has tried
> scripting first.  :)
>

There is also a highly useful utility for running scripts in separate
processes outside of Leo:  

g.execute_shell_commands.

execute_shell_commands(commands,trace = False):

'''Execute each shell command in a separate process.
  Wait for each command to complete, except those starting with '&'
'''

But that's kinda cryptic.  Examples (tested):

    g.execute_shell_commands(['pwd','ls'],trace = True)

or:

    g.execute_shell_commands('pwd',trace = True)

In other words, the 'commands' argument can be either a string, or a list
of strings.

EKR

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to