cmd all commands method?
placid
Bulkan at gmail.com
Sat Feb 17 08:44:07 EST 2007
placid wrote:
> Hi all,
>
> if i want to treat every cmdloop prompt entry as a potential command
> then i need to overwrite the default() method ?
>
> What i want to achieve is to be able to support global variable
> creation for example;
>
> res = sum 1 2
>
> this would create a variable res with the result of the method
> do_sum() ?
>
> then would i be able to run;
>
> sum a 5
this should have been,
sum res 5
>
> this would return 8 or an error saying that res is not defined
>
>
> Cheers
More information about the Python-list
mailing list