#!/usr/bin/python """ Redirect the output of a pipe to your gtalk contact use as someprogram | gpipe.py contact """ import xmpp import sys login = 'usrname' # @gmail.com pwd = 'passcode' cnx = xmpp.Client('gmail.com') cnx.connect( server=('talk.google.com',5223) ) cnx.auth( login,pwd, 'Sending...') name = sys.argv[1] for i in sys.stdin: cnx.send( xmpp.Message( name+"@gmail.com" , i[:-1] ))