<!--/*SC*/DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"/*EC*/-->
<html><head><title></title><style type="text/css"><!--body{padding:1ex;margin:0px;font-family:sans-serif;font-size:small;}a[href]{color:-moz-hyperlinktext !important;text-decoration:-moz-anchor-decoration;}blockquote{margin:0;border-left:2px solid #144fae;padding-left:1em;}blockquote blockquote{border-color:#006312;}blockquote blockquote blockquote{border-color:#540000;}--></style></head><body><div style="font-family: Arial; font-size: medium;" dir="ltr"><div>We have a bunch of command line utilities that use all the CPU capacity available to them. Our customer has asked us to find ways we might make these utilities more system friendly by occassionally calling what they refered to as a win32 equivalent of VB's (Visual Basic) doevents() function.</div>
<div> </div>
<div>I googled this topic and found a Mark Hammond suggestion with qualifications[1]:</div>
<div> </div>
<div>win32gui.Pump(Waiting)Messages</div>
<div> </div>
<div>Is there a recommended way to run our utilities in a more CPU friendly way? I was thinking of calling time.sleep( P ) every N iterations through our processing but I'm not clear on the pros and cons of this technique vs. a strategy that proactively pumps waiting messages.</div>
<div> </div>
<div>Malcolm</div>
<div> </div>
<div>[1] http://mail.python.org/pipermail/python-win32/2005-October/003920.html</div></div></body></html>