pythonidelockup

python sleep == IDE lock up


When my script sleeps for 50sec my IDE locks up which is very annoying. I cant switch tabs, look through my source, type code, etc. It happens in pylde and pyscripter, i havent tried other IDEs. What can i do to fix this? i'm actually doing

for i in range(0, timeInSeconds): time.sleep(1) 

hoping the IDE will update once per second but it doesnt look that way. What can i do to fix this?


Solution

  • I'm assuming you are running your code from within the IDE?

    Your IDE is probably blocking while running your code. Look for a setting of some sort which might control that behaviour, otherwise I think your only choice would be to change IDE. (Or, run your code from outside the IDE)