Windows command prompt freezing on focus

command linewindows

I have a few python scripts which contain no pause commands and no prompts for user input however I find that when I change my window focus to the Windows cmd window the output will freeze until I press 'Enter'.

Is there a know cause for this? Should I enable/disable a setting in the cmd options to avoid this?

A search of my case keeps bringing up cases of people wanting pauses in their code – which I do not.

Best Answer

How are you selecting/focussing that window? If you simply Alt+Tab to it or click its titlebar, the scrolling output shouldn't pause. My guess is you have QuickEdit Mode turned on (right-click the command prompt windows's titlebar and select Properties) and you are clicking inside the window with your mouse, thus selecting text by mistake and causing the program to pause.

1