<s> import dbus <EOL> def __init__ ( ) : <EOL> """<STR_LIT>""" <EOL> return PidginPlugin ( ) <EOL> class PidginPlugin : <EOL> def __init__ ( self ) : <EOL> """<STR_LIT>""" <EOL> self . title = "<STR_LIT>" <EOL> self . author = "<STR_LIT>" <EOL> self . description = "<STR_LIT>" <EOL> def on_song_change ( self , song_dict ) : <EOL> """<STR_LIT>""" <EOL> try : <EOL> bus = dbus . SessionBus ( ) <EOL> obj = bus . get_object ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> self . purple = dbus . Interface ( obj , "<STR_LIT>" ) <EOL> self . set_message ( '<STR_LIT>' % ( song_dict [ '<STR_LIT>' ] , song_dict [ '<STR_LIT>' ] ) ) <EOL> print "<STR_LIT>" <EOL> except : <EOL> print "<STR_LIT>" <EOL> pass <EOL> def set_message ( self , message ) : <EOL> current = self . purple . PurpleSavedstatusGetType ( self . purple . PurpleSavedstatusGetCurrent ( ) ) <EOL> status = self . purple . PurpleSavedstatusNew ( "<STR_LIT>" , current ) <EOL> self . purple . PurpleSavedstatusSetMessage ( status , message ) <EOL> self . purple . PurpleSavedstatusActivate ( status ) </s>
