Skip to main content

Hi, I'm Mariano Guerra, below is my blog, if you want to learn more about me and what I do check a summary here: or find me on twitter @warianoguerra or mastodon

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()
print "amarok is not playing"
print "amarok is not running"

print "dcop not running"

no se porque no lo hice antes...


Comments powered by Disqus