-1

How do I prevent the program from stopping when the user press the console?

For example: enter image description here

I'm trying to create a loop in python where it's printing out number from 0-1000, but when the user click the console, it stopped

How do I prevent this?

I can't find a site or any stackoverflow answer, what I get is only in c# language. I want a python language

Here is a similar problem in c# Code stops executing when a user clicks on the console window

The problem was not on the code, because the code is

for i in range(1000):
 print(i)

EDITED: I want to make the Quick-Edit disabled in python code?

2 Answers2

2

To disable Quick edit mode do the following: right-click on the title bar and select Properties, then select Options, then you disable Quick Edit Mode, then the scrolling doesn't stop when you click in the window.

Shadesfear
  • 749
  • 4
  • 17
  • @Faran2007 As you said yourself it's not a problem with the code. If you just disable quick edit mode, it should work as intendet – Shadesfear Oct 17 '19 at 13:04
  • yes it's not a problem code, but HOW do I disable quick-edit using python? –  Oct 17 '19 at 13:11
  • You question seems to be a duplicate of this one: https://stackoverflow.com/questions/37500076/how-to-enable-windows-console-quickedit-mode-from-python – Shadesfear Oct 17 '19 at 13:13
  • Thanks for helping –  Oct 17 '19 at 14:11
0

In addition to Shadesfear answer, take a look at this topic: How to enable Windows console QuickEdit Mode from python? It's shown there how to enable it, and as Quick Edit Mode is enabled by default in Windows 10, you can use the code presented there to disable it as your program starts.