Thanks Edward, It makes perfect sense and Im thankful for any ideas and suggestions. I have found a way around Kivy needing the .kv files, although that means I have to give up kivy language in favour of python, and for larger projects it wont be convenient. So when I reach the "large projects" phase I will study this post again and solve this issue.
Today I finished making my first grid of buttons with kivy, and it has been far easier, quicker and simpler than with any other GUI I have ever studied. Plus it works in any platform -_- Im so excited with it I made a video then a gif of a gui summoned by Leo, with 2 buttons that when pressed will do "g.es( name of button)", its been so fun!! http://postimg.org/image/4tulrxhaz/ On Sunday, July 14, 2013 3:32:45 PM UTC+2, Edward K. Ream wrote: > > On Sun, Jul 14, 2013 at 5:51 AM, Fidel Pérez <[email protected]<javascript:> > > 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.
