Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #85447 > unrolled thread

tabs and the Python3 console

Started byLaura Creighton <lac@openend.se>
First post2015-02-10 15:36 +0100
Last post2015-02-11 10:25 +1100
Articles 3 — 3 participants

Back to article view | Back to comp.lang.python


Contents

  tabs and the Python3 console Laura Creighton <lac@openend.se> - 2015-02-10 15:36 +0100
    Re: tabs and the Python3 console wxjmfauth@gmail.com - 2015-02-10 08:32 -0800
    Re: tabs and the Python3 console Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-02-11 10:25 +1100

#85447 — tabs and the Python3 console

FromLaura Creighton <lac@openend.se>
Date2015-02-10 15:36 +0100
Subjecttabs and the Python3 console
Message-ID<mailman.18610.1423579009.18130.python-list@python.org>
I have the debian version of python3 installed here.

Python 3.4.2 (default, Nov 13 2014, 07:01:52) 
[GCC 4.9.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 

But I cannot seem to type a tab here:

>>> def fn(**kw):
...

(I type a tab here, and get a beep.  If I type a tab again I get:

Display all 178 possibilities? (y or n)
ArithmeticError(            chr(
AssertionError(             class
AttributeError(             classmethod(
BaseException(              compile(
BlockingIOError(            complex(
BrokenPipeError(            continue
<lots more skipped, because you get the idea>
...

Do I need a python3 enabled with readline support, or something?

Thanks very much,
Laura Creighton

[toc] | [next] | [standalone]


#85453

Fromwxjmfauth@gmail.com
Date2015-02-10 08:32 -0800
Message-ID<80e218c2-ac8f-455c-8506-445d4d603c43@googlegroups.com>
In reply to#85447
Le mardi 10 février 2015 15:37:18 UTC+1, Laura Creighton a écrit :
> I have the debian version of python3 installed here.
> 
> Python 3.4.2 (default, Nov 13 2014, 07:01:52) 
> [GCC 4.9.2] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> 
> 
> But I cannot seem to type a tab here:
> 
> >>> def fn(**kw):
> ...
> 
> (I type a tab here, and get a beep.  If I type a tab again I get:
> 
> Display all 178 possibilities? (y or n)
> ArithmeticError(            chr(
> AssertionError(             class
> AttributeError(             classmethod(
> BaseException(              compile(
> BlockingIOError(            complex(
> BrokenPipeError(            continue
> <lots more skipped, because you get the idea>
> ...
> 
> Do I need a python3 enabled with readline support, or something?
> 
> Thanks very much,
> Laura Creighton

Does it mean, that you can not insert two consecutive tabs
because some brillant devs have decided that inserting two
consecutive tabs is doing something else than really
inserting two tabs?
What a world!

[toc] | [prev] | [next] | [standalone]


#85479

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2015-02-11 10:25 +1100
Message-ID<54da9359$0$13005$c3e8da3$5496439d@news.astraweb.com>
In reply to#85447
Laura Creighton wrote:

> I have the debian version of python3 installed here.
> 
> Python 3.4.2 (default, Nov 13 2014, 07:01:52)
> [GCC 4.9.2] on linux
> Type "help", "copyright", "credits" or "license" for more information.
>>>> 
> 
> But I cannot seem to type a tab here:
> 
>>>> def fn(**kw):
> ...
> 
> (I type a tab here, and get a beep.  If I type a tab again I get:
> 
> Display all 178 possibilities? (y or n)
> ArithmeticError(            chr(
> AssertionError(             class
> AttributeError(             classmethod(
> BaseException(              compile(
> BlockingIOError(            complex(
> BrokenPipeError(            continue
> <lots more skipped, because you get the idea>
> ...
> 
> Do I need a python3 enabled with readline support, or something?


The good news is that after many, many years of supporting tab completion,
Python 3.4 finally enables it by default.

The bad news is that its handling of the tab key is fundamentally broken.

There are a couple of tasks on the bug tracker dealing with this. I'm not
able to search for them right now, but you may be able to find them: there
is a task to enable tab completion by default, which I expect is closed by
now, and (if memory serves me correctly) a second, open, task to fix the
tab-for-indentation issue.

As an alternative, you could try my tab completion and history module:

http://code.google.com/p/tabhistory/

I've been using it on Linux for about three or four years, and although I
don't promise it is bug-free, it shouldn't blow up your computer :-)

You can read an announcement here:

http://code.activestate.com/lists/python-list/672898/

Feedback from Mac and Windows users is very, very welcome.



-- 
Steven

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web