Re: [Python-Dev] New Module: CommandLoop

2006-02-19 Thread Fredrik Lundh
Bob Ippolito wrote: > Doesn't this discussion belong on c.l.p / python-list? yes, please. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/pyth

Re: [Python-Dev] New Module: CommandLoop

2006-02-19 Thread Crutcher Dunnavant
totally agree, removed them. On 2/19/06, Terry Reedy <[EMAIL PROTECTED]> wrote: > I know it is tempting and perhaps ok in your own privatecode, but casually > masking builtins like 'str' in public library code sets a bad example ;-). > > tjr > > > > ___

Re: [Python-Dev] New Module: CommandLoop

2006-02-19 Thread Terry Reedy
I know it is tempting and perhaps ok in your own privatecode, but casually masking builtins like 'str' in public library code sets a bad example ;-). tjr ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python

Re: [Python-Dev] New Module: CommandLoop

2006-02-19 Thread Bob Ippolito
On Feb 19, 2006, at 5:03 PM, Raymond Hettinger wrote: >>> @cmdloop.aliases('goodbye') >>> @cmdloop.shorthelp('say goodbye') >>> @cmdloop.usage('goodbye TARGET') >>> >>> to just: >>> >>> @cmdloop.addspec(aliases=['goodbye'], shorthelp ='say >>> goodbye', >>> usage

Re: [Python-Dev] New Module: CommandLoop

2006-02-19 Thread Crutcher Dunnavant
On 2/19/06, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > >> @cmdloop.aliases('goodbye') > >> @cmdloop.shorthelp('say goodbye') > >> @cmdloop.usage('goodbye TARGET') > >> > >> to just: > >> > >> @cmdloop.addspec(aliases=['goodbye'], shorthelp ='say goodbye', > >> us

Re: [Python-Dev] New Module: CommandLoop

2006-02-19 Thread Raymond Hettinger
>> @cmdloop.aliases('goodbye') >> @cmdloop.shorthelp('say goodbye') >> @cmdloop.usage('goodbye TARGET') >> >> to just: >> >> @cmdloop.addspec(aliases=['goodbye'], shorthelp ='say goodbye', >> usage='goodbye TARGET') >> >> leaving the possibility of multiple decorator

Re: [Python-Dev] New Module: CommandLoop

2006-02-19 Thread Crutcher Dunnavant
s/catch modules/catch exceptions/g On 2/19/06, Crutcher Dunnavant <[EMAIL PROTECTED]> wrote: > Whoa, thanks. Incorporated the suggestions to the code. > > On 2/19/06, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > > [Crutcher Dunnavant] > > > Anyway, I'm looking for feedback, feature requests befo

Re: [Python-Dev] New Module: CommandLoop

2006-02-19 Thread Crutcher Dunnavant
Whoa, thanks. Incorporated the suggestions to the code. On 2/19/06, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > [Crutcher Dunnavant] > > Anyway, I'm looking for feedback, feature requests before starting the > > submission process. > > With respect to the API, the examples tend to be visually d

Re: [Python-Dev] New Module: CommandLoop

2006-02-19 Thread Raymond Hettinger
[Raymond Hettinger] > 1) The "chars" variable can be eliminated and the "while chars" and > "c=chars.pop(0)" sequence simplified to just: >for c in reversed(str): Actually, that should have been just: for c in str: . . . Raymond ___

Re: [Python-Dev] New Module: CommandLoop

2006-02-19 Thread Raymond Hettinger
[Crutcher Dunnavant] > Anyway, I'm looking for feedback, feature requests before starting the > submission process. With respect to the API, the examples tend to be visually dominated dominated by the series of decorators. The three decorators do nothing more than add a function attribute, so

Re: [Python-Dev] New Module: CommandLoop

2006-02-19 Thread Crutcher Dunnavant
Yes, I know. Hence this not being a patch. This is really meant to be a compelling alternative to cmd.Cmd, and as such I'm trying to get some discussion about it. On 2/19/06, Brett Cannon <[EMAIL PROTECTED]> wrote: > On 2/19/06, Crutcher Dunnavant <[EMAIL PROTECTED]> wrote: > > This is something I

Re: [Python-Dev] New Module: CommandLoop

2006-02-19 Thread Brett Cannon
On 2/19/06, Crutcher Dunnavant <[EMAIL PROTECTED]> wrote: > This is something I've been working on for a bit, and I think it is > more or less ready to bring up on this list. I'd like to add a module > (though probably not for 2.5). > > Before you ask, this module is _not_ compatible with cmd.py, a

Re: [Python-Dev] New Module: CommandLoop

2006-02-19 Thread Crutcher Dunnavant
oops, error in the example: s/commandLoop/CommandLoop/g On 2/19/06, Crutcher Dunnavant <[EMAIL PROTECTED]> wrote: > This is something I've been working on for a bit, and I think it is > more or less ready to bring up on this list. I'd like to add a module > (though probably not for 2.5). > > Befor

[Python-Dev] New Module: CommandLoop

2006-02-19 Thread Crutcher Dunnavant
This is something I've been working on for a bit, and I think it is more or less ready to bring up on this list. I'd like to add a module (though probably not for 2.5). Before you ask, this module is _not_ compatible with cmd.py, as it is command oriented, whereas cmd.py is line oriented. Anyway,