El 14/12/10 10:12, Edward K. Ream escribió:
On Tue, Dec 14, 2010 at 10:08 AM, Offray Vladimir Luna Cárdenas <[email protected]> wrote:Yes. I give it a glimpse but seems too related with scripting Leo in Python and not the other way around, that is what I'm looking for. For example, g.es("Hello word") would be non-portable outside Leo and the rest of the chapter seems related to create scripts that access positions of the outline and things like that. Yesterday, after looking at this chapter, I ended looking for a newbie environment for python programming and I found SPE (Stani's Python Editor) that seems friendly enough. You start writing your scritps and see a explicit button that run them and, if the script needs parameters a pop-up window will ask for them, and you will see print the outputs in an embedded shell. You can also import your code to that shell and stat to thinker with it. I think that this kind of experience is possible with Leo, and may be is just matter of the proper documentation about how to make this possible or having a similar experience.That might be a good first programming project for you :-)
:) May be a third one. But from a newbie point of view having the SPE goddies is really helping. For now my workflow will be use SPE for python learning in a web2py project and Leo for organizing the Python code and ideas with the classical @file directive (that's part of the Joy of Leo letting to use your preferred IDE in combination with it).
As a simpler alternative, you could run Leo from a console, and use the Python print statement to produce output. I actually never use Python's input statement. Instead, I set arguments in the code itself, or get them from a part of the Leo outline containing the script, as in the rst3 command, for example.
Very clever! I will try it when I have more python experience Cheers, Offray -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
