Created
December 3, 2010 15:30
-
-
Save chesster/727095 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
import os, sys, dbus | |
from random import randint | |
program = os.path.basename(sys.argv[0]) | |
bus = dbus.SessionBus() | |
obj = bus.get_object("im.pidgin.purple.PurpleService", "/im/pidgin/purple/PurpleObject") | |
purple = dbus.Interface(obj, "im.pidgin.purple.PurpleInterface") | |
def pidgin_buddylist(): | |
a = purple.PurpleAccountsGetAllActive()[0] | |
for i in purple.PurpleFindBuddies(a,""): | |
print purple.PurpleBuddyGetAlias(i) | |
def pidgin_status(message): | |
old_status = purple.PurpleSavedstatusGetCurrent() | |
status_type = purple.PurpleSavedstatusGetType(old_status) | |
new_status = purple.PurpleSavedstatusNew("", status_type) | |
purple.PurpleSavedstatusSetMessage(new_status, message) | |
purple.PurpleSavedstatusActivate(new_status) | |
pidgin_buddylist() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment