Python in endless loop
Peter Otten
__peter__ at web.de
Mon Sep 17 10:07:49 EDT 2018
YnIk wrote:
> Dear Python,
> Hello. This is an email concerning about my Python program(3.7.0). It
> keeps printing out stuff that’s too fast to read. If I try to write code,
> it just keeps on going. I have tried Ctrl+C, but even that’s not working.
> I searched through all my flies and can’t find one error that would cause
> this. I tried uninstalling and reinstalling the program multiple times,
> and that doesn’t work. What should I do? Thanks, Ed
Run the script from the command line and feed the output to the more
utility:
C:\> py path\to\myscript.py | more
Do not type the C:\> which is a placeholder for the command prompt; you
should be seeing something similar.
Once you have a rough idea where the problem occurs you can add print
statements to inspect the value of the problematic variables.
A tad more advanced: your editor (which one?) may support setting
"breakpoints" and running the script under a debugger step by step or until
it hits a breakpoint.
If you need help with debugging and your script is short you may also post
it here or provide a link to the source code.
More information about the Python-list
mailing list