python3, tabs, and Terminal

Langer, Stephen A. (Fed) stephen.langer at
Thu Oct 13 00:17:20 UTC 2022

Thank you!  I should have thought to google "readline".

 -- Steve

-----Original Message-----
From: macports-users <macports-users-bounces at> on behalf of Joshua Root <jmr at>
Date: Wednesday, October 12, 2022 at 6:17 PM
To: "macports-users at" <macports-users at>
Subject: Re: python3, tabs, and Terminal

    On 2022-10-13 08:05 , Joshua Root wrote:
    > Langer, Stephen A. (Fed) wrote:
    >> I don’t know if I have something wrong in my settings or expectations, 
    >> or if this is a bug.  Typing a tab in an Apple Terminal window while 
    >> using any version of Python3 from MacPorts makes the terminal enter 
    >> some kind of editing mode, instead of just indenting the line.  
    >> Python2 from MacPorts doesn't do this, and neither does Python3 from 
    >> Apple, which makes me think that it's some kind of Python 
    >> configuration issue in MacPorts.  The same thing happens when using 
    >> iTerm2.
    >> For example:
    >> % python3
    >> Python 3.8.15 (default, Oct 12 2022, 03:09:36)
    >> [Clang 13.0.0 (clang-1300.0.29.3)] on darwin
    >> Type "help", "copyright", "credits" or "license" for more information.
    >> >>>/def f(): /<tab><tab> <--- anything typed here brings up old lines 
    >> from other sessions, when I just want to indent
    > Do you see this with newer python versions? I don't see it in 3.10, 
    > FWIW. I remember there were some bugs with libedit support in older 
    > versions.
    > You can try installing py38-gnureadline, which will override the 
    > built-in readline module.
    > - Josh

    Turns out this is a feature: 

    - Josh

More information about the macports-users mailing list