Maybe you could consider using the Tk::send and Tk::recieve IPC interface for passing messages to your Tk interface on your localhost. You can do this from a non-gui app by simply making a fake widget.
"Never take yourself too seriously, because everyone knows that fat birds dont fly" -FLC