[Python] Python REPL tab completion on MacOS

Discussão em 'Python' iniciado por Stack, Maio 29, 2025.

  1. Stack

    Stack Membro Participativo

    Before upgrading to lion, I had tab complete working in a python shell via terminal. Following these instructions, it was possible to have tab complete working.

    Since upgrading to Lion, I am now unable to get tab complete working in a terminal session of Python. I've followed the above instructions to the letter, and it still does not work.

    Is there a difference with the readline module in Lion? Hooking in to the 'tab:complete' option no longer seems to work. I'm wondering if it is terminal that is ignoring readline, or if it is python itself.

    Python version: 2.7.1

    Edit:

    By tab complete, I mean I could do something like the following:

    # django
    import MyModel
    MyModel.objects.a[TAB] # will complete to all()

    Continue reading...

Compartilhe esta Página