You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dear all,
I am getting mad how to figure this out.
Windows 11, Winpython64-3.13.3.0dot.7z.
I run "WinPython Command Prompt.exe".
At the prompt, with my Italian keyboard, I get:
"[" with "Alt Gr" + "è"
"]" with "Alt Gr" + "+"
"{" with "Alt Gr" + "Shift" + "è"
etc
I also get these characters and others with the usual sequences "Alt"+number keyboard, such as "Alt"+1,2,5 for "}", etc
I now enter python's shell by calling "python".
None of these sequences or key combination works anymore:
"Alt Gr" + "è" gives nothing but if I repeat it I get "["
"Alt Gr" + "+" gives nothing
If I want "]" I can do "Alt Gr" + "è" followed by "Alt Gr" + "+"
If I want "{" I can do "Alt Gr" + "è" followed by "Shift" + "Alt Gr" + "è"
If I want "}" I can do "Alt Gr" + "è" followed by "Shift" + "Alt Gr" + "+"
This happens only within python.
What is also strange is that I tried another portable python for Windows, with the same absurd result.
Edit: it also happens with an installable version.
Any hint?
Thanks
Giorgio giorgio.denunzio@unisalento.it
The issue was raised on cpython, already resolved I think on 3.14.0b1.
So either you launch python repl from the powershell console, either you wait python 3.13.4
Dear stonebig,
Thank you very much for your reply! So I had the “luck” of choosing version 3.13 😄
After reading your answer:
I tried launching WinPython Powershell Prompt.exe and then calling Python, but the problem is still there.
I also tried using the installed version by opening PowerShell and calling C:\Users\giorg\AppData\Local\Programs\Python\Python313\python.exe directly from the command line, but the issue persists.
Anyway, it’s not a big problem for now: I’ll simply download an older version and wait for 3.14.
Thanks again!
Best regards,
Giorgio
You are right, impossible to get it working... shame... so let see, just 7 lines to adjust... in your \python\Lib_pyrepl.py:
I'll do that for b2, but you may two... check lines with # GH-132439 pull 133460
def get_event(self, block: bool = True) -> Event | None:
"""Return an Event instance. Returns None if |block| is false
and there is no event pending, otherwise waits for the
completion of an event."""
if self.event_queue:
return self.event_queue.pop()
while True:
rec = self._read_input(block)
if rec is None:
return None
if rec.EventType == WINDOW_BUFFER_SIZE_EVENT:
return Event("resize", "")
if rec.EventType != KEY_EVENT or not rec.Event.KeyEvent.bKeyDown:
# Only process keys and keydown events
if block:
continue
return None
key_event = rec.Event.KeyEvent
raw_key = key = key_event.uChar.UnicodeChar
if key == "\r":
# Make enter unix-like
return Event(evt="key", data="\n") # GH-132439 pull 133460
elif key_event.wVirtualKeyCode == 8:
# Turn backspace directly into the command
key = "backspace"
elif key == "\x00":
# Handle special keys like arrow keys and translate them into the appropriate command
key = VK_MAP.get(key_event.wVirtualKeyCode)
if key:
if key_event.dwControlKeyState & CTRL_ACTIVE:
key = f"ctrl {key}"
elif key_event.dwControlKeyState & ALT_ACTIVE:
# queue the key, return the meta command
self.event_queue.insert(0, Event(evt="key", data=key)) # GH-132439 pull 133460
return Event(evt="key", data="\033") # keymap.py uses this for meta
return Event(evt="key", data=key) # GH-132439 pull 133460
if block:
continue
return None
if key_event.dwControlKeyState & ALT_ACTIVE:
# queue the key, return the meta command
if not key_event.dwControlKeyState & CTRL_ACTIVE: # GH-132439 pull 133460
self.event_queue.insert(0, Event(evt="key", data=key)) # GH-132439 pull 133460
return Event(evt="key", data="\033") # GH-132439 pull 133460
return Event(evt="key", data=key) # GH-132439 pull 133460
def push_char(self, char: int | bytes) -> None:````
the slowness of REPL on copy/past was raised in february... python/cpython#130328
a fix reached 3.14 yesterday python/cpython#134653
not sure the fix will reach 3.13 ... in theory it's more a bug than a feature.
Activity
stonebig commentedon May 15, 2025
It's a python-3.13.3 issue... when launched from a dos console
stonebig commentedon May 15, 2025
The issue was raised on cpython, already resolved I think on 3.14.0b1.
So either you launch python repl from the powershell console, either you wait python 3.13.4
stonebig commentedon May 15, 2025
Maybe it was OK on python-3.13.2 , also
stonebig commentedon May 15, 2025
fix for upcoming python-3.13.4: python/cpython#133460
issue was raised April 13th 2025 (only): python/cpython#132439
giorgio-denunzio commentedon May 16, 2025
Dear stonebig,
Thank you very much for your reply! So I had the “luck” of choosing version 3.13 😄
After reading your answer:
Anyway, it’s not a big problem for now: I’ll simply download an older version and wait for 3.14.
Thanks again!
Best regards,
Giorgio
stonebig commentedon May 18, 2025
You are right, impossible to get it working... shame... so let see, just 7 lines to adjust... in your \python\Lib_pyrepl.py:
I'll do that for b2, but you may two... check lines with
# GH-132439 pull 133460stonebig commentedon May 18, 2025
waiting 15 days bugs me
giorgio-denunzio commentedon May 18, 2025
Congratulations :-)
Thanks for sharing!
Best,
Giorgio
stonebig commentedon May 18, 2025
NOT FULLY resolved in b2, binaries at:
stonebig commentedon May 21, 2025
well a=[ 1, 2] works, but not copy/paste of code
stonebig commentedon May 21, 2025
So the "hammer" way WAS, is, to just copy from cpython-3.13 branch the inside
lib\_pyreplobject that have changes since less than 2 month.Trying to be smart was stupid
you can download at the same _pyrepl place all the 7 filesmodified since less than 2 month from https://github.com/python/cpython/tree/3.13/Lib/_pyrepl
It works, did check on the copy/past of sudoku code in the console proofing
giorgio-denunzio commentedon May 21, 2025
Wow! When I opened the issue, I didn’t think I’d end up keeping you up at night! :-D
Congratulations!
Giorgio
stonebig commentedon May 21, 2025
nevertheless, copy.paste is wayyyy faster in 3.14 console... so it fixes but it's slow:
stonebig commentedon May 21, 2025
this is were you see there is way more WORKFORCE than before in cpython
stonebig commentedon May 21, 2025
in 3.13.1 , the copy paste WAS also that slow... and NOT WORKING.
so:
... feeling less stupid, but it was still not smart
stonebig commentedon May 24, 2025
also, current REPL in 3.14 b1:
stonebig commentedon May 26, 2025
the slowness of REPL on copy/past was raised in february... python/cpython#130328
a fix reached 3.14 yesterday python/cpython#134653
not sure the fix will reach 3.13 ... in theory it's more a bug than a feature.
stonebig commentedon May 26, 2025
as I was already faster when I took the 3.14, I suppose it comes from this that already speed-up things python/cpython#133247
stonebig commentedon May 26, 2025
no backport for the slowness problem .... so 3.13 will remain with ptpython when available.
for 3.14, we need to see what 3.14b2 brings in completion.
ptpython (and jedi) was a giant leap forward, I hope more of it will integrate the standard over time