Popular recipes tagged "ctypes" and "windows" but not "threading"http://code.activestate.com/recipes/tags/-threading+ctypes+windows/2013-04-25T01:26:19-07:00ActiveState Code RecipesGet memory usage of Windows processes using GetProcessMemoryInfo (via ctypes) (Python)
2013-04-25T01:26:19-07:00Ben Hoythttp://code.activestate.com/recipes/users/4170919/http://code.activestate.com/recipes/578513-get-memory-usage-of-windows-processes-using-getpro/
<p style="color: grey">
Python
recipe 578513
by <a href="/recipes/users/4170919/">Ben Hoyt</a>
(<a href="/recipes/tags/ctypes/">ctypes</a>, <a href="/recipes/tags/memory/">memory</a>, <a href="/recipes/tags/process/">process</a>, <a href="/recipes/tags/win32/">win32</a>, <a href="/recipes/tags/windows/">windows</a>).
</p>
<p>These functions call the Win32 function GetProcessMemoryInfo() using ctypes to get the memory usage of the current process. Works on both 32-bit and 64-bit Windows and Python 2.6+ (including Python 3.x).</p>
Thinkpad Turtle (Python)
2010-03-26T20:04:05-07:00Michael Grünewaldhttp://code.activestate.com/recipes/users/4172244/http://code.activestate.com/recipes/576985-thinkpad-turtle/
<p style="color: grey">
Python
recipe 576985
by <a href="/recipes/users/4172244/">Michael Grünewald</a>
(<a href="/recipes/tags/ctypes/">ctypes</a>, <a href="/recipes/tags/thinkpad/">thinkpad</a>, <a href="/recipes/tags/win32/">win32</a>, <a href="/recipes/tags/windows/">windows</a>).
Revision 4.
</p>
<p>A small program utilizing the <code>ctypes</code> and <code>turtle</code> modules. You can <em>drive</em> the little turtle by turning your Thinkpad (which must have APS).</p>
<p><em>Requirements:</em></p>
<p>You need a newer Thinkpad (T41, T42, T43, T6x, R5x, R6x or any newer) and need to have the Active Protection System drivers (now called Lenovo Airbag Protection) installed.</p>
Detect when system is idle (Python)
2009-05-31T01:18:03-07:00Gabriel Genellinahttp://code.activestate.com/recipes/users/924636/http://code.activestate.com/recipes/576786-detect-when-system-is-idle/
<p style="color: grey">
Python
recipe 576786
by <a href="/recipes/users/924636/">Gabriel Genellina</a>
(<a href="/recipes/tags/ctypes/">ctypes</a>, <a href="/recipes/tags/idle/">idle</a>, <a href="/recipes/tags/idle_time/">idle_time</a>, <a href="/recipes/tags/time/">time</a>, <a href="/recipes/tags/user_input/">user_input</a>, <a href="/recipes/tags/windows/">windows</a>).
</p>
<p>Detect when system is idle, globally. That is, the user is not moving the mouse nor typing anything, in any application (not just our program).</p>