This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: replace mode is always on in console
Type: Stage:
Components: Interpreter Core, Windows Versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: amaury.forgeotdarc, techtonik
Priority: normal Keywords:

Created on 2013-03-21 06:48 by techtonik, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (6)
msg184848 - (view) Author: anatoly techtonik (techtonik) Date: 2013-03-21 06:48
It is very annoying behavior of Python 3.3.0 that when you type in the console, replace mode is always on, and even after you press insert to go insert mode, it resets after every executed line.

Windows Vista 32.
Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:55:48) [MSC v.1600 32 bit (Intel)] on win32
msg184852 - (view) Author: anatoly techtonik (techtonik) Date: 2013-03-21 07:11
In Python 2 replace mode is always off.
msg184853 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2013-03-21 07:24
Python has absolutely no code to control the Windows console. It has always used fgets().

On the other hand, Windows keeps independent settings per shortcut or executable, so if you started Python directly from the start menu (or by opening the python.exe executable from the Explorer), you may have set different options.

To be sure, open a cmd.exe console, and start Python from there. The behavior should be the same in all versions.
msg184854 - (view) Author: anatoly techtonik (techtonik) Date: 2013-03-21 07:33
Ok. From cmd.exe both work the same in insert mode, but when I execute them from different shell (http://www.farmanager.com/opensource.php?l=en), the Python 3 starts to misbehave. And Python 2 works ok, because there is pyreadline installed. With -s -S keys it also starts to misbehave.

Any ideas why this external shell affects Python3 and not Python2?
msg184857 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2013-03-21 07:52
I don't know Far Manager. Maybe it starts everything in overwrite mode (and check its console settings)

pyreadline completely overrides Python's input methods and bypasses the console, so behavior is completely independent.
msg184886 - (view) Author: anatoly techtonik (techtonik) Date: 2013-03-21 17:06
I've messed with some settings, upgraded Far, restarted it during yet another test and suddenly everything worked. I hate such stuff. Thanks for support.
History
Date User Action Args
2022-04-11 14:57:43adminsetgithub: 61705
2013-03-21 17:06:09techtoniksetstatus: open -> closed
resolution: not a bug
messages: + msg184886
2013-03-21 07:52:30amaury.forgeotdarcsetmessages: + msg184857
2013-03-21 07:33:30techtoniksetmessages: + msg184854
2013-03-21 07:24:03amaury.forgeotdarcsetnosy: + amaury.forgeotdarc
messages: + msg184853
2013-03-21 07:11:01techtoniksetmessages: + msg184852
2013-03-21 06:48:11techtonikcreate