GH not responding whenever i run scripts in Cpython

when i run the scripts outside GH, it is OK. But when I put it in CPython and run in GH, it will appear “not responding”. anything wrong? both rhino 5 and 6 are not ok.
Great thanks if anyone could help.

my script consists of a for loop and will use subprocess to run external python file.