Suppose I have a node that contains a script. I create a script
button. During its execution there is an "if" check. If the condition
that is getting passed to if is true, the script shall not execute
further. Adding a "return" statement gives "SyntaxError: 'return'
outside function". I've also tried sys.exit(), which closes leo
completely.
Of course I can write the script like
if <condition>:
[do nothing]
else:
[continue execution]
or
if <not condition>:
[continue execution]
The problem is that if I have more checks like this, my piece of code
will look like a bunch of nested "if" blocks. This is ugly so I want
to avoid it. I would like to be able to return from the script to leo.
If this is possible, how would I do it?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---