On Fri, Feb 01, 2019 at 08:43:53PM -0600, eryk sun <[email protected]> wrote:
> On 2/1/19, Terry Reedy <[email protected]> wrote:
> > On 2/1/2019 3:31 PM, Oleg Broytman wrote:
> >
> >> Python REPL is missing the following batteries:
> >> * Persistent history;
>
> Python's built-in REPL relies on the readline module for history. In
> Windows you'll need to install pyreadline, an implementation that uses
> the Windows console API via ctypes.
Yep, I use it. The question is: Does Python REPL need this battery
preinstalled and preconfigured; or any other battery as well?
> Out of the box, Python uses the the built-in line editing and history
> that's provided by the Windows console host (conhost.exe). There's an
> undocumented function to read this history (as used by doskey.exe),
> but there's no function to load lines into it. I suppose it could be
> replayed manually in a loop that calls WriteConsoleInputW and
> ReadConsoleW.
Oleg.
--
Oleg Broytman https://phdru.name/ [email protected]
Programmers don't die, they just GOSUB without RETURN.
_______________________________________________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/