tkdock

The tkdock package is a small, Cocoa-based Tcl extension that allows a Tcl/Tk application to change its icon on the OS X Dock while running. This can be useful for indicating changes in application state, for instance that the application is executing a long-running process, connecting to a server, or similar activities.

More information: http://opensource.codebykevin.com/native.html#tkdock