കോഡ് ഡാ ഇവിടെ
import xmpp as jabCln
import getpass
import sys
def callmainLoader():
print "Enter your Gmail ID (Without @gmail.com) : "
getUserName=sys.stdin.readline()[:-1]
getUserPass=getpass.getpass('Enter your password : ')
print 'Enter Your Status Message(default \'Auto Idle\') : '
getUserStatus=sys.stdin.readline()[:-1]
if len(getUserStatus) < 1:
getUserStatus='Auto Idle'
setGtalkStatus(getUserName,getUserPass,'away',getUserStatus)
def setGtalkStatus(username, password,show,status,):
myGtalServer=['gmail.com','talk.google.com',5223]
gtalkOpenCnt = jabCln.Client(myGtalServer[0])
gtalkOpenCnt.connect(server=(myGtalServer[1],myGtalServer[2]))
gtalkOpenCnt.auth(username, password, 'python_status_message')
gtalkOpenCnt.send(jabCln.Iq(typ='set', queryNS='google:shared-status',\
payload=[jabCln.Node('show', payload=show)]))
gtalkOpenCnt.send(jabCln.Iq(typ='set', queryNS='google:shared-status',\
payload=[jabCln.Node('status', payload=status)]))
if __name__ == '__main__':
callmainLoader()