Using the built-in cmd class

Dipl. -Ing. Ashu Akoachere Ashu.Akoachere at limbe.eurobell.co.uk
Mon Dec 8 18:32:31 EST 2003


Has any one got experience in using the built-in cmd class? I have derived a subclass from the base class, but it seems as if the arguments of functions using the cmd-interpreter are limited in their number. Precisely' I have something like this:
.
.def help_add(self):
    print "Adds arguments"

def do_add(self,arg1,arg2):
    return (arg1 + arg2)

Python complains about the number of arguments in the do_add function. Has anyone got a modified cmd that can handle multiple arguments?

Ashu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20031208/67a35b71/attachment.html>


More information about the Python-list mailing list