Skip to content

Auto complete modules in new PyREPL #121717

@moqodow

Description

@moqodow

Feature or enhancement

Proposal:

Using the new PyREPL in Python 3.14.0a0 does not auto complete for module imports.

I think adding auto completion for the import and from statement would greatly benefit the experience when using the REPL for quickly testing out concept and ideas in python. It will also improve the general workflow.

There is an implementation for import and from package, module auto completion in ipython:
IPython/Core/completerlib/module_completion(line)

I discussed this feature idea with Łukasz Langa at EuroPython 2024 Sprint event. He pointed me to some caveats and issue that should be considered:

  • We might need to try import to get a list of all available modules and packages. This might result in undesired side effects.

I will try to make a draft Pull Request implementing a sensible solution.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

I have discussed this feature at the EuroPython 2024 sprint event with Łukasz Langa.

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytopic-replRelated to the interactive shelltype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions