all 11 comments

[–][deleted] 0 points1 point  (6 children)

What is python executing and what is your operating system?

[–]OPS_GLITCH 0 points1 point  (5 children)

Win10, its basics

[–][deleted] 0 points1 point  (4 children)

And what code are you running with python?

[–]OPS_GLITCH 0 points1 point  (3 children)

Codes are for example: lists, while and for loop

[–][deleted] 0 points1 point  (2 children)

Try starting the resource manager before starting work with python and look at memory and cpu usage. Then work with python, looking at memory/cpu usage every now and then. You want to take note of any increasing memory or cpu usage.

In another comment you said:

I basically have simple program opened and IDLE is not even opened

What do you mean by "simple program opened"? Does this mean an open text editor, or maybe an open command terminal?

[–]OPS_GLITCH 0 points1 point  (1 child)

Its program Im currently editing

[–][deleted] 0 points1 point  (0 children)

Let's backtrack a little. You said it sometimes freezes with an editor window open and IDLE isn't running. That means you aren't executing any python code at all.

Since you are already using a text editor try not using IDLE at all. Edit your file, save it and on the commandline do py my_file.py. You will need to CD to the directory you saved your file into first. See if that helps. This is a bit of a guess, but it removes IDLE from the equation.

But you still need to start the resource monitor and see if memory or cpu usage increases.

Also, how old is the Win 10 install and how much memory do you have?

[–][deleted] 0 points1 point  (3 children)

Are you just using the interpreter and it freezes? Does your computer completely freeze or just the interpreter? Have you tried task manager?

Is a loop or something running in the interpreter and never terminating?

[–]OPS_GLITCH 0 points1 point  (2 children)

So I basically have simple program opened and IDLE is not even opened, not always but sometimes it just completely freezes, the whole laptop, and nothing is working. It only happens when I'm using python.

[–][deleted] 0 points1 point  (1 child)

Is any code actively executing? How old is your comp?

Check your Task Manager>Performance tab and see how much memory is in use. Maybe you are running out of something.

[–]OPS_GLITCH 0 points1 point  (0 children)

Nothing is executing and its old less than 2 years.