[issue45870] There's no readline module on Windows Python (cmd.Cmd)

2022-02-02 Thread E:V:A
E:V:A added the comment: I would like to make the python community aware that there has recently been a renewed interest in updating and maintaining 'pyreadline', but in a new(ish) repository 'pyreadline3'. https://github.com/pyreadline3/pyreadline3 This apparently now works under Py3.10,

[issue45870] There's no readline module on Windows Python (cmd.Cmd)

2021-11-29 Thread keeely
keeely added the comment: I'm attaching an example usage of cmd + readline to show how you can have context-specific history for sub-shells. WARNING: WRITES FILES TO CWD! In the event that someone does implement this on Windows it would be nice if this worked. That doesn't mean

[issue45870] There's no readline module on Windows Python (cmd.Cmd)

2021-11-29 Thread keeely
keeely added the comment: Regrettably I cannot submit a PR for the docs because I value my online anonymity and Python submissions require a real name (IIRC), but my suggestion would be pretty simple. Taking as an example, for termios (https://docs.python.org/3/library/termios.html), we

[issue45870] There's no readline module on Windows Python (cmd.Cmd)

2021-11-27 Thread Guido van Rossum
Guido van Rossum added the comment: Okay, so that's all hypothetical. It looks like the status quo is not likely to change, so we should just document it. I wonder if keeely is interested in submitting a PR for the docs? -- ___ Python tracker

[issue45870] There's no readline module on Windows Python (cmd.Cmd)

2021-11-27 Thread Eryk Sun
Eryk Sun added the comment: > What does "the builtin readline support" refer to here? > Presumably not GNU Readline? That's referring to the readline(ish) support that's built into the console host for ReadFile() and ReadConsole() calls when the input stream is in line-input mode. I've

[issue45870] There's no readline module on Windows Python (cmd.Cmd)

2021-11-27 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks, Eryk, I only read the part of the issue that landed in my inbox (fhe first message and everything after Terry added me to the nosy list). Sorry. You wrote: > The console/terminal team at Microsoft apparently don't want to do anything > with the

[issue45870] There's no readline module on Windows Python (cmd.Cmd)

2021-11-27 Thread Eryk Sun
Eryk Sun added the comment: > AFAIK the reason command history works in cmd.py on Windows is > that it's built into the terminal program. Or maybe into the > operating system. As mentioned in msg406800, input editing, history (e.g. up/down arrows, F7 popup, F8 completion), and alias support

[issue45870] There's no readline module on Windows Python (cmd.Cmd)

2021-11-27 Thread Guido van Rossum
Guido van Rossum added the comment: AFAIK the reason command history works in cmd.py on Windows is that it's built into the terminal program. Or maybe into the operating system. Thus, the user can use line editing and history, but there is no API (in Python) to interact with these. I'm

[issue45870] There's no readline module on Windows Python (cmd.Cmd)

2021-11-27 Thread Eryk Sun
Eryk Sun added the comment: > You can take the view that it's not a bug (with some justification), > but a few lines in the cmd docs would make all the difference in > terms of wasted time. If anything, I think the readline documentation should have a note explaining the situation in

[issue45870] There's no readline module on Windows Python (cmd.Cmd)

2021-11-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: Guido and Raymond, you are the two active coredevs that have contributed the most lines to cmd module. What do either of you think? -- nosy: +gvanrossum, rhettinger ___ Python tracker

[issue45870] There's no readline module on Windows Python (cmd.Cmd)

2021-11-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: Sorry, you obviously mean https://docs.python.org/3/library/cmd.html#module-cmd What to add where still applies. -- ___ Python tracker ___

[issue45870] There's no readline module on Windows Python (cmd.Cmd)

2021-11-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: What specific sentences would you like where in which doc. (Please link as 'cmd doc' is too vague.) -- ___ Python tracker ___

[issue45870] There's no readline module on Windows Python (cmd.Cmd)

2021-11-27 Thread keeely
keeely added the comment: You can take the view that it's not a bug (with some justification), but a few lines in the cmd docs would make all the difference in terms of wasted time. I have now abandoned my Windows port and suggested users install WSL2 instead which is the easiest way

[issue45870] There's no readline module on Windows Python (cmd.Cmd)

2021-11-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thank you Eryk for the info. As a bug report, this should be closed as '3rd party'. As an enhancement request, it needs to be specified more and should perhaps be discussed on python-ideas. -- nosy: +terry.reedy

[issue45870] There's no readline module on Windows Python (cmd.Cmd)

2021-11-22 Thread Eryk Sun
Eryk Sun added the comment: > The Windows cmd implementation clearly uses readline or > some compatible lib under the hood The REPL shell and input() call PyOS_Readline(). If this call isn't hooked (e.g. by the readline module), and stdin is a console file, then it reads a line from the

[issue45870] There's no readline module on Windows Python (cmd.Cmd)

2021-11-22 Thread keeely
New submission from keeely : In the past this was worked around by installing a third-party module: https://github.com/pyreadline/pyreadline For Python 3.10, however this module doesn't work. And pyreadline doesn't seem to be maintained anymore, so it's possible it won't get fixed.