Ir al contenido principal

This is my blog, more about me at marianoguerra.github.io

🦋 @marianoguerra.org 🐘 @marianoguerra@hachyderm.io 🐦 @warianoguerra

python + dcop + amarok


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...