Baffled by readline module

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Mar 10 00:09:28 EST 2023


On 10/03/23 2:57 pm, Chris Angelico wrote:
> import sys; "readline" in sys.modules
> 
> Is it?

Yes, it is -- but only when using the repl!
If I put that in a script, I get False.

My current theory is that it gets pre-imported when using
Python interactively because the repl itself uses it.

-- 
Greg


More information about the Python-list mailing list