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: marianoguerra.github.io or find me on twitter @warianoguerra or Mastodon @marianoguerra@hachyderm.io

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