Python Forum
msvcrt.getch prints twice inside loop
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
msvcrt.getch prints twice inside loop
#4
I just realised I have one Windows 10 computer not updated to 1803 yet, and sure enough, msvcrt.getch() does not return the scan code. Only one call to msvcrt.getch() is made when in a loop:

The same script as before only returns the key pressed:

Output:
loop 1 b'e'
What changed with Windows feature update 1803?
Reply


Messages In This Thread
RE: msvcrt.getch prints twice inside loop - by ReallyBigTeeth - Jun-24-2018, 12:23 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Variable definitions inside loop / could be better? gugarciap 2 517 Jan-09-2024, 11:11 PM
Last Post: deanhystad
  How to create a variable only for use inside the scope of a while loop? Radical 10 2,028 Nov-07-2023, 09:49 AM
Last Post: buran
  zfill prints extra et the end of a var tester_V 4 967 Mar-24-2023, 06:59 PM
Last Post: tester_V
  Help adding a loop inside a loop Extra 31 4,941 Oct-23-2022, 12:16 AM
Last Post: Extra
  variable prints without being declared. ClockPillow 2 1,865 Jul-11-2021, 12:13 AM
Last Post: ClockPillow
  Adding to the dictionary inside the for-loop - weird behaviour InputOutput007 5 2,821 Jan-21-2021, 02:21 PM
Last Post: InputOutput007
  why print('\n') produced 2 new lines instead of 1 - Located inside a FOR loop JulyFire 2 2,611 Jan-10-2021, 01:50 AM
Last Post: JulyFire
  Output prints Account.id at the end? LastStopDEVS 5 2,882 Dec-19-2020, 05:59 AM
Last Post: buran
  Try/Exept prints only ones tester_V 11 4,041 Nov-03-2020, 02:38 AM
Last Post: tester_V
  Creating a variables inside FOR loop zazas321 5 4,182 Sep-16-2020, 04:42 PM
Last Post: Naheed

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020