Most viewed recipes tagged "ctypes" and "windows" but not "idle"http://code.activestate.com/recipes/tags/ctypes+windows-idle/views/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>
Win32 named mutex class for system-wide mutex (Python)
2011-07-15T21:12:40-07:00Ben Hoythttp://code.activestate.com/recipes/users/4170919/http://code.activestate.com/recipes/577794-win32-named-mutex-class-for-system-wide-mutex/
<p style="color: grey">
Python
recipe 577794
by <a href="/recipes/users/4170919/">Ben Hoyt</a>
(<a href="/recipes/tags/ctypes/">ctypes</a>, <a href="/recipes/tags/lock/">lock</a>, <a href="/recipes/tags/mutex/">mutex</a>, <a href="/recipes/tags/process/">process</a>, <a href="/recipes/tags/threading/">threading</a>, <a href="/recipes/tags/win32/">win32</a>, <a href="/recipes/tags/windows/">windows</a>).
</p>
<p>NamedMutex is a class for using Windows (Win32) named mutexes for system-wide locks. For example, we use these to lock system-wide log files that multiple processes can write to.</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>