Stateful directory scanning in Python. Makes a great ~/.Trash cleaner.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.gitignore Removed .pyc files. Feb 6, 2009
com.newartisans.cleanup.plist Change leader in Nov 10, 2018


Stateful directory scanning in Python

The enclosed module,, is intended for doing repeated scans of the
same directory over time, and taking action based on any changes (or lack
thereof) found there.

I use it mainly to clean up my trash directory and continuously verify the
integrity of my file archives. See for an example of how I do
this, along with its associated launchctl script. It’s designed to be
extremely efficient in the use of memory and CPU, so that it doesn’t bog down
the system even should you choose to run it hourly (I run it once a day).

John Wiegley <>