tab completion in cmd 
Author Message
 tab completion in cmd

Hi,  

is it possible to have configurable tab-completion ( la tcsh) in the
command line interface (cmd) of Python?

        TIA, Luca.



Fri, 31 Oct 2003 00:29:48 GMT  
 tab completion in cmd

Quote:

> is it possible to have configurable tab-completion ( la tcsh) in
> the command line interface (cmd) of Python?

"import rlcompleter" shoud do the trick.

Cheers,
M.

--
  > I'm a little confused.
  That's because you're Australian!  So all the {*filter*} flows to
  your head, away from the organ most normal guys think with.
                        -- Mark Hammond & Tim Peters, comp.lang.python



Fri, 31 Oct 2003 01:32:04 GMT  
 tab completion in cmd

Quote:
> is it possible to have configurable tab-completion ( la tcsh) in the
> command line interface (cmd) of Python?

Yes, if your python has readline support compiled in.

Put this in your ~/.pythonrc.py:

import rlcompleter, readline
readline.parse_and_bind('tab: complete')

(I hope that's what you meant - I have no idea what "configurable"
tab-completion would be)
--
Remco Gerlich



Fri, 31 Oct 2003 01:42:29 GMT  
 tab completion in cmd

Quote:


> > is it possible to have configurable tab-completion ( la tcsh) in
> > the command line interface (cmd) of Python?

> "import rlcompleter" shoud do the trick.

From the docs, putting the following in a file named by PYTHONSTARTUP
environment variable will enable TAB-completion for interactive session:
    import rlcompleter
    rlcompleter.readline.parse_and_bind('tab: complete')

--William Park, Open Geometry Consulting, Mississauga, Ontario, Canada.
  8 CPU cluster, (Slackware) Linux, Python, LaTeX, vim, mutt



Fri, 31 Oct 2003 01:56:01 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. cmd, readline, and /path/filename completion

2. rlcompleter2 <TAB> interactive completion

3. Interactive Console Program with Tab-Completion

4. TAB completion

5. completion on tab?

6. CLISP tab completion problem

7. tab completion on clisp

8. rlcompleter2 <TAB> interactive completion

9. Tabs, Tabs, Tabs!!

10. Change directory cmd file - DCD.CMD

11. Detecting the current tab in a tab panel

12. Tabs within Tabs

 

 
Powered by phpBB® Forum Software