On Sun, Jul 14, 2013 at 5:51 AM, Fidel Pérez <[email protected]> wrote:


> So, is there a way in which I could make the @auto siblings file nodes of
>> the script be available for the script, and at the same time be executing
>> it within Leo?
>>
>
Interesting project!  What I am about to say may be nonsense in the kivy
context, but here are some hints and general remarks...

The node, c.executeScript & helpers, in leoPy.leo, contains the code to
look at first.  As you will see, c.executeScript calls g.getScript to
"compose" the script from the Leo outline and then calls
c.executeScriptHelper to do most of the remaining work.

Depending on a setting (captured in the c.write_script_file ivar)
c.executeScriptHelper will then call c.writeScriptFile to write the script
to the file system.  Again, as you will see, most of c.writeScriptFile is
concerned with computing the proper place to write the script.

When I say "as you will see", I am indicating that I am reading the code as
I write this post.  The *only* thing I remembered originally was that were
methods called g.getScript and c.executeScript.  Actually, I had to search
to discover that it was actually c.executeScript ;-)

Anyway, to sorta answer your question, it appears that you might want to
monkey-patch c.writeScriptFile.  Maybe you can even use the setting
associated with the c.write_script_file ivar.  Searching for
write_script_file I found the following code::

    c.write_script_file = getBool('write_script_file')

which tells me that the setting in question is @bool write_script_file

In short, it might be possible to hard-wire the @bool write_script_file
setting to do what you want.  If that doesn't work, you might try
monkey-patching c.writeScriptFile.

HTH.  Please feel free to ask more questions.

Edward

-- 
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