[IPython-user] Hierarchical TAB completion?
Thu Apr 5 07:51:21 CDT 2007
What about working on a "%with" magic function that somehow changes the
evaluation context (pushes a new sub-context onto a stack),
thing would be easy in IPython or not.
I've no idea about the IPython internals; might not be feasible.
Ville M. Vainio wrote:
> On 4/3/07, Pierre Bielmann <firstname.lastname@example.org> wrote:
>> Hi all,
>> Is it possible to implement (with iPython) a shell which behaves like a
>> Router Command Line Shell (e.g. Cisco IOS shell, etc.)? I'd like to "enter"
>> objects in a hierachical
>> fashion and execute commands/methods and also have command line completion
>> only in that context
>> (and not globally). Here is a simple example of what I have in mind:
> Perhaps you could hook a completer method of your state-aware object
> as a re_key = '.*' (match all), so it would be "tried" for every
> command line. It would just see that it's currently in state 'user',
> and return appropriate completions.
> I.e. you have only one completer function, which just behaves
> differently depending on the state. Granted that it's not the most
> elegant solution.
Department of Mechanical and Manufacturing Engineering
University of New South Wales, Sydney, Australia
More information about the IPython-user