I am running a script that consumes 100% CPU when running (looping 2^k times, k=17) and uses LOTS of bigints. When the script ends, I get the last output line and the python prompt (>>>), BUT cpu is still at 100% and ignores Ctrl-C - for hours!. All I want is the output listing, but clicking on the IDLE output window can take minutes before showing the selected text. Is there a secondary process (such as garbage collection) that might have got itself lost? I’ve never used debuggers or loggers in python, but I strongly suspect that the cause is not my code (there’s no input), but the demanding load for several/many hours. Any thoughts welcome, since for every increase of k, the time to run doubles (and so does the output - for k=17, 515841 lines). Once it gets to a week for a k value, then I’ll stop and see if I have enough data for my study.
I am running IDLE 3.10.12 on Linux Mint 21.3 Cinnamon
Note: running python3 from CLI is superquick, so that’s what I’ll use. But still want to know why IDLE locks up.