import os
import pydcop
s = os.system( "ps aux|grep dcopserver|grep -v grep" )
if s == 0:
print "dcop running"
if "amarok" in pydcop.apps():
print "amarok is running"
amarok = pydcop.DCOPApplication( "amarok" )
if amarok.player.isPlaying():
print "amarok is playing"
print amarok.player.artist()
else:
print "amarok is not playing"
else:
print "amarok is not running"
else:
print "dcop not running"
no se porque no lo hice antes...
No hay comentarios.:
Publicar un comentario