Popular recipes tagged "system_programming" but not "shutdown"http://code.activestate.com/recipes/tags/system_programming-shutdown/2016-09-20T17:46:37-07:00ActiveState Code RecipesQuick-and-dirty Windows drive detector (Python) 2016-09-20T17:46:37-07:00Vasudev Ramhttp://code.activestate.com/recipes/users/4173351/http://code.activestate.com/recipes/580699-quick-and-dirty-windows-drive-detector/ <p style="color: grey"> Python recipe 580699 by <a href="/recipes/users/4173351/">Vasudev Ram</a> (<a href="/recipes/tags/drives/">drives</a>, <a href="/recipes/tags/sysadmin/">sysadmin</a>, <a href="/recipes/tags/system_programming/">system_programming</a>, <a href="/recipes/tags/utility/">utility</a>, <a href="/recipes/tags/windows/">windows</a>). </p> <p>This is a quick-and-dirty Python script to detect the currently available drives on your Windows PC.</p> Control CPU Usage by using ctypes (Win32 Platform) (Python) 2009-01-26T09:32:34-08:00Shao-chuan Wanghttp://code.activestate.com/recipes/users/4168519/http://code.activestate.com/recipes/576634-control-cpu-usage-by-using-ctypes-win32-platform/ <p style="color: grey"> Python recipe 576634 by <a href="/recipes/users/4168519/">Shao-chuan Wang</a> (<a href="/recipes/tags/cpu_usage/">cpu_usage</a>, <a href="/recipes/tags/ctypes/">ctypes</a>, <a href="/recipes/tags/system_programming/">system_programming</a>, <a href="/recipes/tags/win32/">win32</a>). Revision 3. </p> <p>This program will make your cpu work at a given cpu usage. It should be also able to work on machines with multi-processors. The program has been tested on Windows xp sp2 with python of version 2.5.4.</p> <p>The implementation is based on the fact that it will adjust the ratio of being busy over being idle in the main process to approach the target cpu usage rate. </p> Get CPU Usage by using ctypes (Win32 Platform) (Python) 2009-01-26T06:43:38-08:00Shao-chuan Wanghttp://code.activestate.com/recipes/users/4168519/http://code.activestate.com/recipes/576631-get-cpu-usage-by-using-ctypes-win32-platform/ <p style="color: grey"> Python recipe 576631 by <a href="/recipes/users/4168519/">Shao-chuan Wang</a> (<a href="/recipes/tags/cpu_usage/">cpu_usage</a>, <a href="/recipes/tags/ctypes/">ctypes</a>, <a href="/recipes/tags/system_programming/">system_programming</a>, <a href="/recipes/tags/win32/">win32</a>). Revision 2. </p> <p>The following code has been tested at Windows XP sp2 with Python of version 2.5.4.</p>