On Thu, Dec 4, 2008 at 8:56 AM, sudhir <[EMAIL PROTECTED]> wrote:
>
> I stumbled upon Leo, got very excited with the possibility and tried
> to write my first python program in Leo.

First, don't use @all now.  It's for special situations, like notes
files, where you just want to dump lots of nodes into a file without
worrying whether a node is referenced or not.

So just stick with @others.

The typical pattern is to put this in body text of the top-level @thin node::

    @language python
    @tabwidth -4 # or 4 or 8 if you want hard tabs.
    @others

That's all.

To define a class in a descendant node, do::

    class myClass:
        @others

You can put a *single* class in the top-level node of an @thin tree
the same way.

The rules:

1. No node may contain more than one @others directive.
2. Every node that isn't a section-definition node must have an
ancestor node containing an @others directive.

For many examples of using @others, see leoPy.leo (AKA LeoPyRef.leo).

Please feel free to ask any other questions.  Newbies always have top
priority :-)

Edward

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

Reply via email to