Popular recipes by Brian Davis http://code.activestate.com/recipes/users/4119187/2011-09-18T21:29:17-07:00ActiveState Code Recipesusing pyHook to block Windows Keys (Python)
2011-09-18T21:29:17-07:00Brian Davishttp://code.activestate.com/recipes/users/4119187/http://code.activestate.com/recipes/553270-using-pyhook-to-block-windows-keys/
<p style="color: grey">
Python
recipe 553270
by <a href="/recipes/users/4119187/">Brian Davis</a>
(<a href="/recipes/tags/sysadmin/">sysadmin</a>).
</p>
<p>Normally you do NOT want to block operating system key combinations but there are a few legitimate cases where you do. In my case I am making a pygame script for my 1 year old to bang on the keyboard and see/hear shapes/color/sounds in response. Brian Fischer on the pygame mailing list pointed me to pyHook. This example was taken from here: <a href="http://www.mindtrove.info/articles/pyhook.html" rel="nofollow">http://www.mindtrove.info/articles/pyhook.html</a> and modified to use the pygame event system.</p>
Remove duplicate files (Python)
2008-03-17T10:38:07-07:00Brian Davishttp://code.activestate.com/recipes/users/4119187/http://code.activestate.com/recipes/551773-remove-duplicate-files/
<p style="color: grey">
Python
recipe 551773
by <a href="/recipes/users/4119187/">Brian Davis</a>
(<a href="/recipes/tags/files/">files</a>).
</p>
<p>A little script to remove duplicate files. Uses md5sum and a dictionary. There may be a shorter way to do it but this was simple. Works only on cygwin/Linux/Unix systems.</p>
Data Processing Shell (Python)
2008-01-24T16:26:43-08:00Brian Davishttp://code.activestate.com/recipes/users/4119187/http://code.activestate.com/recipes/543265-data-processing-shell/
<p style="color: grey">
Python
recipe 543265
by <a href="/recipes/users/4119187/">Brian Davis</a>
.
</p>
<p>I've found that I frequently need to open a file, do some processing on it and then load it into excel. This script provides a nice interface for opening the file using a wxPython dialog box, some code to load the result .csv file into excel using win32com and a function to contain the processing code. I should probably turn this into a module sometime...</p>