I can define a command which takes args if I use a @command node

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
# in file test-commands.py
def tester(g, p):
    g.es(p.b)

# in node
@command tester
\
 from test-commands import tester
 tester(g, p)
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

When I use registerCommand, I don't see how I can specify arguments.

from test-commands import tester
c.keyHandler.registerCommand('tester', None, tester, verbose=True)

The above gives a console error
TypeError: tester() takes exactly 2 arguments (1 given)

Any suggestions?

Thanks,
Kent

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