0

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?

11
  • Can you add code to reproduce your issue? I don't understand what your current problem is. Commented Oct 17, 2019 at 11:47
  • The code was fine, but when I press the console the program stopped Commented Oct 17, 2019 at 12:00
  • @Faran2007 You should add the code so we are able to see whats going on Commented Oct 17, 2019 at 12:06
  • @Shadesfear no, no, no. The problem was not on the code Commented Oct 17, 2019 at 12:15
  • Taken from the link the linked to: This happens if you have Quick Edit Mode enabled on the console window. If you right-click on the title bar and select Properties, then select the Options tab, you can check to see if Quick Edit Mode is enabled. If you disable Quick Edit Mode, then the scrolling doesn't stop when you click in the window. Commented Oct 17, 2019 at 12:19

2 Answers 2

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.

Sign up to request clarification or add additional context in comments.

4 Comments

@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
yes it's not a problem code, but HOW do I disable quick-edit using python?
You question seems to be a duplicate of this one: stackoverflow.com/questions/37500076/…
Thanks for helping
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.

1 Comment

Thanks for helping

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.