This is the place for queries that don't fit in any of the other categories.


Postby Kebap » Fri Oct 04, 2013 9:18 am

Back when I was fiddling with MS Excel Visual Basic, there was a command called DoEvents() which was very important to me. I am searching for something similar for Python. That is especially PyScripter IDE.

What is DoEvents?

When I made loops in VBasic, which I would expect to run on for minutes at a time, I would throw DoEvents() in there at some point of the loop. That way, whenever the IDE reaches that command, it will actually respond to GUI interaction, etc, anything that has come up to that point since starting the code. That means, if I leave out this command, Excel will stay unresponsible until the very end of the program run. With the command included though, I can click and move and interact with the Excel (and thereby, the IDE too) windows.

I have now run into an unprecedented event in that I have sucessfully stressed Pyscripter IDE enough, so it does not respond to my clicking anymore while running my awesome code. My OS thinks, the IDE may have crashed, and suggests me to close it, as it does not respond. I can assume in the background, the IDE is actually fine and running my code (changing my files, that is why I can see it from outside the IDE). I assume, if I wait long enough, it will finish and respond again. I never waited that long though, as I needed to interrupt execution, which was also not possible. If I run the same code in command-line btw, it will run just fine.

Maybe this is a IDE specific question, maybe other IDEs have similar flaws, maybe you have never had that same problem and just wonder what I am talking about, but really, I just need a DoEvents() kind of "pause and lets do what else is on the plate before continuing the ongoing code execution" type command.
Due to the reasons discussed here we are moving to on October 1, 2016.

This forum will be closed. Please create an account at the new site to continue discussion.

Posts: 689
Joined: Thu Apr 04, 2013 1:17 pm
Location: Germany, Europe

Return to General Coding Help

Who is online

Users browsing this forum: Yahoo [Bot] and 8 guests