Popular recipes by Larry Bates http://code.activestate.com/recipes/users/651848/2008-02-12T10:03:10-08:00ActiveState Code RecipesCreating a single instance application (Linux version) (Python)
2008-02-12T10:03:10-08:00Larry Bateshttp://code.activestate.com/recipes/users/651848/http://code.activestate.com/recipes/546512-creating-a-single-instance-application-linux-versi/
<p style="color: grey">
Python
recipe 546512
by <a href="/recipes/users/651848/">Larry Bates</a>
(<a href="/recipes/tags/threads/">threads</a>).
</p>
<p>Sometimes it is necessary to ensure that only one instance of application is running. This quite simple solution uses pid file to achieve this, and will run only on Linux platform. This is a nearly compatible version to the Windows version posted by Dragan Jovelic (I fixed the mispelling of alreadyrunning method).</p>
Python DAO interface class (Python)
2004-09-03T14:41:59-07:00Larry Bateshttp://code.activestate.com/recipes/users/651848/http://code.activestate.com/recipes/303349-python-dao-interface-class/
<p style="color: grey">
Python
recipe 303349
by <a href="/recipes/users/651848/">Larry Bates</a>
(<a href="/recipes/tags/database/">database</a>).
</p>
<p>This is a simple base class that can be used to quickly get connected to any database that has DAO interface. I've used it quite a lot with MS Access databases and it has worked quite well for me. It really is just a Python wrapper around the DAO COM object. Hasn't been tested extensively, but worked in the projects that I've used it in so far.</p>
<p>Larry Bates</p>
Console (text) progress indicator class (Python)
2004-08-11T06:25:36-07:00Larry Bateshttp://code.activestate.com/recipes/users/651848/http://code.activestate.com/recipes/299207-console-text-progress-indicator-class/
<p style="color: grey">
Python
recipe 299207
by <a href="/recipes/users/651848/">Larry Bates</a>
.
</p>
<p>I was finding that I needed a progress indicator for Linux and Windows console applications that could be used to show the user that work was progressing and how much of the total work that had been completed. I finally broke down and wrote this class that seems to do exactly what I wanted. Since I continue to see questions about how to write such a class on Comp.Lang.Python, I thought I'd donate it to this Cookbook archive.</p>
General Class for interfacing with Windows .DLLs (Python)
2002-08-27T12:23:31-07:00Larry Bateshttp://code.activestate.com/recipes/users/651848/http://code.activestate.com/recipes/146847-general-class-for-interfacing-with-windows-dlls/
<p style="color: grey">
Python
recipe 146847
by <a href="/recipes/users/651848/">Larry Bates</a>
.
</p>
<p>When I wanted to use Python to call functions in Windows .DLL I was surprised that I had a difficult time locating the necessary information for making this happen. This is a base class that you use to define your class (and methods for each function). It uses Sam Rushings calldll, cstring and membuf modules but I think it will make interfacing with any DLL much easier for the beginner (especially for the first time).</p>