Latest recipes tagged "status"http://code.activestate.com/recipes/tags/status/new/2012-04-15T14:13:02-07:00ActiveState Code RecipesWait for PID and check for PID existance (POSIX) (Python) 2012-04-15T14:13:02-07:00Giampaolo RodolĂ http://code.activestate.com/recipes/users/4178764/http://code.activestate.com/recipes/578022-wait-for-pid-and-check-for-pid-existance-posix/ <p style="color: grey"> Python recipe 578022 by <a href="/recipes/users/4178764/">Giampaolo RodolĂ </a> (<a href="/recipes/tags/exists/">exists</a>, <a href="/recipes/tags/exit/">exit</a>, <a href="/recipes/tags/pid/">pid</a>, <a href="/recipes/tags/process/">process</a>, <a href="/recipes/tags/status/">status</a>, <a href="/recipes/tags/timeout/">timeout</a>, <a href="/recipes/tags/wait/">wait</a>). Revision 7. </p> <p>Two functions: one which waits for a certain PID to terminate (with optional timeout), another one which checks whether a process with a given PID is running.</p> <p>This was extracted from <a href="http://code.google.com/p/psutil/">psutil</a> project which also provides a Windows implementation.</p> <p>Timeout functionality is implemented as a busy loop and it was inspired by <a href="http://bugs.python.org/issue5673." rel="nofollow">http://bugs.python.org/issue5673.</a></p> Sensible Loop Status (Python) 2008-10-05T02:14:52-07:00David Lamberthttp://code.activestate.com/recipes/users/4167420/http://code.activestate.com/recipes/576528-sensible-loop-status/ <p style="color: grey"> Python recipe 576528 by <a href="/recipes/users/4167420/">David Lambert</a> (<a href="/recipes/tags/debug/">debug</a>, <a href="/recipes/tags/debugging/">debugging</a>, <a href="/recipes/tags/logging/">logging</a>, <a href="/recipes/tags/progress/">progress</a>, <a href="/recipes/tags/status/">status</a>). </p> <p>A LoopStatus object tests true according to geometric progression or time intervals. This enables rapid time estimates for long running codes, typically in a loop, without producing copious highly repetitive output.</p>